Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SwitchAttribute Constructor (String^, Type^)

 

Initializes a new instance of the SwitchAttribute class, specifying the name and the type of the switch.

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

public:
SwitchAttribute(
	String^ switchName,
	Type^ switchType
)

Parameters

switchName
Type: System::String^

The display name of the switch.

switchType
Type: System::Type^

The type of the switch.

The switchName parameter should match the DisplayName property of the switch.

The following code example shows the use of the SwitchAttribute constructor to create a switch attribute. This code example is part of a larger example provided for the TraceSource class.

No code example is currently available or this language may not be supported.

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