System.Diagnostics.SwitchLevelAttribute Class

Identifies the level type for a switch.

See Also: SwitchLevelAttribute Members


[System.MonoLimitation("This attribute is not considered in trace support.")]
public sealed class SwitchLevelAttribute : Attribute


This attribute is intended to be applied to all classes that inherit from the System.Diagnostics.Switch class. The purpose of the attribute is to identify the type that specifies the switch criteria of the switch. Each switch determines whether a trace is to be written, based on whether an event type matches or exceeds the value of the SwitchLevelAttribute.SwitchLevelType property for the switch. The type used for the SwitchLevelAttribute.SwitchLevelType property varies for different switches. For example, the switch level type for the System.Diagnostics.BooleanSwitch class is bool, and the switch level type for the System.Diagnostics.TraceSwitch class is System.Diagnostics.TraceLevel.


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