TraceListener.NeedIndent 属性

定义

获取或设置一个值,该值指示是否缩进输出。Gets or sets a value indicating whether to indent the output.

protected:
 property bool NeedIndent { bool get(); void set(bool value); };
protected bool NeedIndent { get; set; }
member this.NeedIndent : bool with get, set
Protected Property NeedIndent As Boolean

属性值

Boolean

如果应缩进输出,则为 true;否则为 falsetrue if the output should be indented; otherwise, false.

注解

注意WriteIndent由和类调用的方法 DefaultTraceListener TextWriterTraceListenerNeedIndent 属性值设置为, false 以防止以后不必要的缩进。Note The WriteIndent method, called by the DefaultTraceListener and TextWriterTraceListener classes, sets the NeedIndent property value to false to prevent later, unnecessary indents. 必须将属性设置 NeedIndenttrue 每次要缩进跟踪输出。You must set the NeedIndent property to true each time you wish to indent trace output.

适用于

另请参阅