次のスクリプト:
cls
function test_me([string]$testVar, $my_array)
{
Write-Host $testVar
}
$test_array = "a","b"
test_me "z", $test_array
次の結果が生成されます。
z System.Object[]
$testVarのみを参照したい
System.Object []がWrite-Hostに返されるのはなぜですか?
次のスクリプト:
cls
function test_me([string]$testVar, $my_array)
{
Write-Host $testVar
}
$test_array = "a","b"
test_me "z", $test_array
次の結果が生成されます。
z System.Object[]
$testVarのみを参照したい
System.Object []がWrite-Hostに返されるのはなぜですか?