Level Property
Collapse the table of content
Expand the table of content

SourceSwitch.Level Property


Gets or sets the level of the switch.

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

public SourceLevels Level {
	[SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]

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.


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.



for operating with unmanaged code. Demand value LinkDemand; Associated enumeration: SecurityPermissionFlag.UnmanagedCode.

.NET Framework
Available since 2.0
Return to top
© 2016 Microsoft