SwitchAttribute Constructor (String^, Type^)
.NET Framework (current version)
Initializes a new instance of the SwitchAttribute class, specifying the name and the type of the switch.
Assembly: System (in System.dll)
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.
.NET Framework
Available since 2.0
Available since 2.0
Show: