Gets or sets the level of the switch.
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.
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);
for operating with unmanaged code. Demand value LinkDemand; Associated enumeration: SecurityPermissionFlag..::.UnmanagedCode.
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