Poznámka:
Přístup k této stránce vyžaduje autorizaci. Můžete se zkusit přihlásit nebo změnit adresáře.
Přístup k této stránce vyžaduje autorizaci. Můžete zkusit změnit adresáře.
The ValidateCount attribute specifies the minimum and maximum number of arguments allowed for a cmdlet parameter.
Syntax
[ValidateCount(int minLength, int maxlength)]
Parameters
MinLength (System.Int32)
Required. Specifies the minimum number of arguments.
MaxLength(System.Int32)
Required. Specifies the maximum number of arguments.
Remarks
- For more information about how to declare this attribute, see How to Validate an Argument Count.
- When this attribute is not invoked, the corresponding cmdlet parameter can have any number of arguments.
- The Windows PowerShell runtime throws an error under the following conditions:
- The
MinLengthandMaxLengthattribute parameters are not of type System.Int32. - The value of the
MaxLengthattribute parameter is less than the value of theMinLengthattribute parameter.
- The
- The ValidateCount attribute is defined by the System.Management.Automation.ValidateCountAttribute class.
See Also
System.Management.Automation.ValidateCountAttribute
Spolupracujte s námi na GitHubu
Zdroj tohoto obsahu najdete na GitHubu, kde můžete také vytvářet a kontrolovat problémy a žádosti o přijetí změn. Další informace najdete v našem průvodci pro přispěvatele.