SwitchParameter.Equality Operator

Definition

Overloads

Equality(Boolean, SwitchParameter)

Implement the == operator for bool and switch parameters.

Equality(SwitchParameter, Boolean)

Implement the == operator for switch parameters and booleans.

Equality(SwitchParameter, SwitchParameter)

Implement the == operator for switch parameters objects.

Equality(Boolean, SwitchParameter)

Implement the == operator for bool and switch parameters.

C++
public:
 static bool operator ==(bool first, System::Management::Automation::SwitchParameter second);

Parameters

first
Boolean

First object to compare.

second
SwitchParameter

Second object to compare.

Returns

True if they are the same.

Applies to

PowerShell SDK 7.4.0 y otras versiones
Producto Versiones
PowerShell SDK 7.2.0, 7.3.0, 7.4.0
Windows PowerShell 5.1.0.0

Equality(SwitchParameter, Boolean)

Implement the == operator for switch parameters and booleans.

C++
public:
 static bool operator ==(System::Management::Automation::SwitchParameter first, bool second);

Parameters

first
SwitchParameter

First object to compare.

second
Boolean

Second object to compare.

Returns

True if they are the same.

Applies to

PowerShell SDK 7.4.0 y otras versiones
Producto Versiones
PowerShell SDK 7.2.0, 7.3.0, 7.4.0
Windows PowerShell 5.1.0.0

Equality(SwitchParameter, SwitchParameter)

Implement the == operator for switch parameters objects.

C++
public:
 static bool operator ==(System::Management::Automation::SwitchParameter first, System::Management::Automation::SwitchParameter second);

Parameters

first
SwitchParameter

First object to compare.

second
SwitchParameter

Second object to compare.

Returns

True if they are the same.

Applies to

PowerShell SDK 7.4.0 y otras versiones
Producto Versiones
PowerShell SDK 7.2.0, 7.3.0, 7.4.0
Windows PowerShell 5.1.0.0