Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Switch Constructor (String, String, String)
Collapse the table of content
Expand the table of content

Switch Constructor (String, String, String)

Note: This constructor is new in the .NET Framework version 2.0.

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
)

Parameters

displayName

The name of the switch.

description

The description of the switch.

defaultSwitchValue

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 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 .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2015 Microsoft