Export (0) Print
Expand All

Trace.IndentSize Property

Gets or sets the number of spaces in an indent.

[Visual Basic]
Public Shared Property IndentSize As Integer
[C#]
public static int IndentSize {get; set;}
[C++]
public: __property static int get_IndentSize();
public: __property static void set_IndentSize(int);
[JScript]
public static function get IndentSize() : int;
public static function set IndentSize(int);

Property Value

The number of spaces in an indent. The default is four.

Remarks

A TextWriterTraceListener interprets this number as spaces. An EventLogTraceListener ignores this value.

This property is stored on per-thread/per-request basis.

To set the AutoFlush and IndentSize for Trace, you can also edit the configuration file that corresponds to the name of your application. The configuration file should be formatted like the following example:

<configuration>
    <system.diagnostics>
       <trace autoflush="false" indentsize="3" />
    </system.diagnostics>
 </configuration>

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Trace Class | Trace Members | System.Diagnostics Namespace | IndentLevel | Debug | Trace | BooleanSwitch | TraceSwitch | TraceListener | DefaultTraceListener | ConditionalAttribute

Show:
© 2014 Microsoft