Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
SourceSwitch Class
 Level Property
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
SourceSwitch..::.Level Property

Gets or sets the level of the switch.

Namespace:  System.Diagnostics
Assembly:  System (in System.dll)
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.

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

1k22b25y.alert_note(en-us,VS.90).gifNote:

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.

Visual Basic
Console.WriteLine(sourceSwitch.Level)

C#
Console.WriteLine(sourceSwitch.Level);

Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, 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
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker