Gets or sets the level of the switch.
Namespace:
System.Diagnostics
Assembly:
System (in System.dll)
Visual Basic (Declaration)
Public Property Level As SourceLevels
Dim instance As SourceSwitch
Dim value As SourceLevels
value = instance.Level
instance.Level = value
public SourceLevels Level { get; set; }
public:
property SourceLevels Level {
SourceLevels get ();
void set (SourceLevels value);
}
public function get Level () : SourceLevels
public function set Level (value : SourceLevels)
This property gets its value from the SwitchSetting property. Setting this property also modifies the SwitchSetting property.
Note: |
|---|
For extensibility, the Level property can be set to any integer, rather than being limited to a SourceLevels enumeration value. |
The following code example displays the value of the Level property for a source switch. This code example is part of a larger example provided for the TraceSource class.
Console.WriteLine(sourceSwitch.Level)
Console.WriteLine(sourceSwitch.Level);
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
.NET Framework
Supported in: 3.5, 3.0, 2.0
Reference