NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Trace.Indent

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);

Property Value

The indent level.

Remarks

The default is zero (0). This property is stored on per-thread/per-request basis.

Example [C#]

The following example sets the indent level and emits tracing messages.

[C#]

Trace.WriteLine("List of errors:");
Trace.Indent = Debug.Indent + 1;
Trace.Writeline("Error 1: File not found");
Trace.WriteLine("Error 2: Directory not found");
Trace.Indent = Debug.Indent - 1;
Trace.WriteLine("End of list of errors");

See Also

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