SwitchParameter Constructor
Initializes a new instance of the SwitchParameter class that identifies whether the switch is present.
Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation.dll)
Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation.dll)
The following example shows how to declare a parameter of type SwitchParameter.
[Parameter(Position = 1)] public SwitchParameter GoodBye { get { return goodbye; } set { goodbye = value; } } private bool goodbye;
Target Platforms
Windows Developer Preview, Windows Server Developer PreviewSend comments about this topic to Microsoft.