The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Debug.IndentSize Property

Gets or sets the number of spaces in an indent.

[Visual Basic]
Public Shared Property IndentSize As Integer
public static int IndentSize {get; set;}
public: __property static int get_IndentSize();
public: __property static void set_IndentSize(int);
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.


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

Debug stores this property on a per-thread/per-request basis.

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

       <trace autoflush="true" indentsize="7" />


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

See Also

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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft