信息库查阅备忘.
Namespace: System.Diagnostics
This class provides methods to display an Assert dialog box, and to emit an assertion that will always fail. This class provides write methods in the following variations: Write, WriteLine, WriteIf and WriteLineIf.
The BooleanSwitch and TraceSwitch classes provide means to dynamically control the tracing output. You can modify the values of these switches without recompiling your application. For information on using the configuration file to set a switch, see the Switch class and the Trace Switches topic.
You can customize the tracing output's target by adding TraceListener instances to or removing instances from the Listeners collection. By default, the DefaultTraceListener class emits trace output.
You can modify the level of indentation using the Indent method or the IndentLevel property. To modify the indent spacing, use the IndentSize property. You can specify whether to automatically flush the output buffer after each write by setting the AutoFlush property to true.