Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SwitchParameter Members

Defines a type of parameter that is evaluated based on its presence on the command line. Cmdlets and functions can define switch parameters that are evaluated by the Windows PowerShell runtime when the parameters of the command are bound.

The following tables list the members exposed by the SwitchParameter type.

  Name Description
  SwitchParameter Initializes a new instance of the SwitchParameter class that identifies whether the switch is present.
Top

  Name Description
public property IsPresent Gets a value that indicates whether the parameter was specified on the command line.
public property static Present Gets an instance of SwitchParameter object that indicates that the parameter is present.
Top

(see also Protected Methods)
 NameDescription
public methodEqualsOverridden. Compares this SwitchParameter object to another object.
public methodGetHashCodeOverridden. Gets the hash code for the parameter.
public methodGetType  (Inherited from Object)
public methodstaticEqualityOverloaded. Compares two objects and returns true if they resolve to the same value. The variants of this operator can compare a Boolean object to a SwitchParameter object, a SwitchParameter object to a Boolean object, and a SwitchParameter object to another SwitchParameter object.
public methodstaticImplicitOverloaded. Casts a SwitchParameter object to a Boolean object or a Boolean object to a SwitchParameter object.
public methodstaticInequalityOverloaded. Compares two objects and returns true if they resolve to different values. The variants of this operator can compare a Boolean object to a SwitchParameter object, a SwitchParameter object to a Boolean object, and a SwitchParameter object to another SwitchParameter object.
public methodToBoolConverts the current SwitchParameter object to a Boolean object.
public methodToStringOverridden. Generates a string representation of the current SwitchParameter object.
Top

(see also Extension Methods)
 NameDescription
protected methodFinalize  (Inherited from Object)
protected methodMemberwiseClone  (Inherited from Object)
Top

  Name Description
public extension method As  Use this method to adapt an object from a foreign app domain to a known interface in this app domain.This element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method As  This is called to adapt an object from a foreign app domain to a known interface in this appDomainThis element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method As  Adapts an object from a foreign app domain to a known interface in this app domain.This element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method Extend  Use this method to adapt and extend an object so that you can pass it to a foreign app domain.This element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method Extend  This is called to adapt and extend an object that we wish to pass to a foreign app domainThis element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method Extend  Used to extend an object with an interface from a foreign app domain.This element is introduced in Windows PowerShell 5.0. (Defined by RequestExtensions.)
public extension method ToEnumerable  This element is introduced in Windows PowerShell 5.0. (Defined by CollectionExtensions.)
Top


Show:
© 2015 Microsoft