Mono Class Library: System.Diagnostics Namespace

System.Diagnostics.Trace Class

Provides a diagnostic message facility. [Edit]

See Also: Trace Members

public sealed class Trace

See Also

ConditionalAttribute

Remarks

The System.Diagnostics.Trace class provides a mechanism for applications to generate diagnostic messages based on the DEBUG conditional define.

In practice, this means that you can call methods on the System.Diagnostics.Trace class, but in order for them to actually be executed at runtime, you must define the DEBUG symbol during compilation. This can be done either through the C# #define keyword or through the C# compiler -define compiler option.

All diagnostic messages generated are indented by Trace.IndentSize*Trace.IndentLevel space characters. Initially, Trace.IndentLevel is 0 (zero), so no indent is generated.

NOTE: The System.Diagnostics.Trace and System.Diagnostics.Debug classes share their public static properties.

[Edit]

Requirements

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