powershellでは、配列に異なる値を追加しようとしています。私は配列からintの値thatsの一つをつかんでいます。残りは文字列値です。私は+を試して、()を追加します。彼らは異なる価値があるからです。どのようにして配列に異なる値を追加できますか?Powershellで配列に異なる型の配列を追加する
スクリプトを参照#set up values
$dataIdListNameNonSpecial = @{}
$email_general = "[email protected]"
$name_general ="John Smith"
$numArray = 123 , 222 ,333
#set up temp array
$tempArray = $numArray[ 0 ], $email_general, $name_general
#try to add into array
$dataIdListNameNonSpecial += , $tempArray
#try to add diffent way into array
$dataIdListNameNonSpecial.Add($tempArray)