.NET Framework Class Library
SourceSwitch..::.Level Property

Gets or sets the level of the switch.

Namespace:  System.Diagnostics
Assembly:  System (in System.dll)
Syntax

Visual Basic (Declaration)
Public Property Level As SourceLevels
Visual Basic (Usage)
Dim instance As SourceSwitch
Dim value As SourceLevels

value = instance.Level

instance.Level = value
C#
public SourceLevels Level { get; set; }
Visual C++
public:
property SourceLevels Level {
    SourceLevels get ();
    void set (SourceLevels value);
}
JScript
public function get Level () : SourceLevels
public function set Level (value : SourceLevels)

Property Value

Type: System.Diagnostics..::.SourceLevels
One of the SourceLevels values that represents the event level of the switch.
Remarks

This property gets its value from the SwitchSetting property. Setting this property also modifies the SwitchSetting property.

NoteNote:

For extensibility, the Level property can be set to any integer, rather than being limited to a SourceLevels enumeration value.

Examples

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.

Visual Basic
Console.WriteLine(sourceSwitch.Level)
C#
Console.WriteLine(sourceSwitch.Level);
.NET Framework Security

Platforms

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.
Version Information

.NET Framework

Supported in: 3.5, 3.0, 2.0
See Also

Reference

Tags :


Page view tracker