ValidateRangeAttribute Constructors

Definition

Overloads

ValidateRangeAttribute(ValidateRangeKind)

Initializes a new instance of the ValidateRangeAttribute class. This constructor uses a predefined ValidateRangeKind.

ValidateRangeAttribute(Object, Object)

Initializes a new instance of the ValidateRangeAttribute class.

ValidateRangeAttribute(ValidateRangeKind)

Initializes a new instance of the ValidateRangeAttribute class. This constructor uses a predefined ValidateRangeKind.

C++
public:
 ValidateRangeAttribute(System::Management::Automation::ValidateRangeKind kind);

Parameters

Applies to

PowerShell SDK 7.4.0 et autres versions
Produit Versions
PowerShell SDK 7.2.0, 7.3.0, 7.4.0

ValidateRangeAttribute(Object, Object)

Initializes a new instance of the ValidateRangeAttribute class.

C++
public:
 ValidateRangeAttribute(System::Object ^ minRange, System::Object ^ maxRange);

Parameters

minRange
Object

Minimum value of the range allowed.

maxRange
Object

Maximum value of the range allowed.

Exceptions

For invalid arguments.

if maxRange has a different type than minRange if maxRange is smaller than minRange if maxRange, minRange are not IComparable

Applies to

PowerShell SDK 7.4.0 et autres versions
Produit Versions
PowerShell SDK 7.2.0, 7.3.0, 7.4.0
Windows PowerShell 5.1.0.0