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 {
	get;
	[SecurityPermissionAttribute(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
	set;
}

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.

System_CAPS_noteNote

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);

SecurityPermission

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

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