description | ms.date | ms.topic | title |
---|---|---|---|
Avoid multiple type specifiers on parameters. |
06/28/2023 |
reference |
AvoidMultipleTypeAttributes |
Severity Level: Warning
Parameters should not have more than one type specifier. Multiple type specifiers on parameters can cause runtime errors.
Ensure each parameter has only 1 type specifier.
function Test-Script
{
[CmdletBinding()]
Param
(
[switch]
[int]
$Switch
)
}
function Test-Script
{
[CmdletBinding()]
Param
(
[switch]
$Switch
)
}