Gets or sets the indent level.
[Visual Basic] Public Shared Property Indent As Integer [C#] public static int Indent {get; set;} [C++] public: __property static int get_Indent(); public: __property static void set_Indent(int); [JScript] public static function get Indent() : int; public static function set Indent(int);
The indent level.
The default is zero (0). This property is stored on per-thread/per-request basis.
The following example sets the indent level and emits debugging messages.
[C#]
Debug.WriteLine("List of errors:"); Debug.Indent = Debug.Indent + 1; Debug.Writeline("Error 1: File not found"); Debug.WriteLine("Error 2: Directory not found"); Debug.Indent = Debug.Indent - 1; Debug.WriteLine("End of list of errors");
Debug Class | Debug Members | System.Diagnostics Namespace | Debug | Trace | BooleanSwitch | TraceSwitch | TraceListener | DefaultTraceListener | ConditionalAttribute