This documentation is archived and is not being maintained.

Switch.Switch(String, String, String) Constructor

Initializes a new instance of the Switch class, specifying the display name, description, and default value for the switch.

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

protected Switch (
	string displayName,
	string description,
	string defaultSwitchValue
protected Switch (
	String displayName, 
	String description, 
	String defaultSwitchValue
protected function Switch (
	displayName : String, 
	description : String, 
	defaultSwitchValue : String
Not applicable.



The name of the switch.


The description of the switch.


The default value for the switch.

The displayName parameter is used to set the value of the DisplayName property, and the description parameter is use to set the value of the Description property. The defaultSwitchValue parameter is the value for the switch if the Value property is not set by code or by the configuration file attribute. See the Switch(String,String) overload for additional information.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0