System.Diagnostics.Trace.IndentSize Property

Gets or sets the number of spaces in an indent.

Syntax

public static int IndentSize { get; set; }

See Also

Value

The indent size.

Remarks

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

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

To set the Trace.AutoFlush and Trace.IndentSize for System.Diagnostics.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:

Example

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

Requirements

Namespace: System.Diagnostics
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0