Compartilhar via


ValidateSetAttribute Constructors

Definition

Overloads

ValidateSetAttribute(String[])

Initializes a new instance of the ValidateSetAttribute class.

ValidateSetAttribute(Type)

Initializes a new instance of the ValidateSetAttribute class. Valid values are returned dynamically from a custom class implementing IValidateSetValuesGenerator

ValidateSetAttribute(String[])

Initializes a new instance of the ValidateSetAttribute class.

public:
 ValidateSetAttribute(... cli::array <System::String ^> ^ validValues);
public ValidateSetAttribute (params string[] validValues);
new System.Management.Automation.ValidateSetAttribute : string[] -> System.Management.Automation.ValidateSetAttribute
Public Sub New (ParamArray validValues As String())

Parameters

validValues
String[]

List of valid values.

Exceptions

For null arguments.

For invalid arguments.

Applies to

ValidateSetAttribute(Type)

Initializes a new instance of the ValidateSetAttribute class. Valid values are returned dynamically from a custom class implementing IValidateSetValuesGenerator

public:
 ValidateSetAttribute(Type ^ valuesGeneratorType);
public:
 ValidateSetAttribute(Platform::Type ^ valuesGeneratorType);
public ValidateSetAttribute (Type valuesGeneratorType);
new System.Management.Automation.ValidateSetAttribute : Type -> System.Management.Automation.ValidateSetAttribute
Public Sub New (valuesGeneratorType As Type)

Parameters

valuesGeneratorType
Type

Class that implements the IValidateSetValuesGenerator interface.

Exceptions

For null arguments.

Applies to