我有两个问题,acually:如何连接整数数组为逗号分隔字符串
- 如何加入整数数组为逗号分隔字符串? (1,2,3)=>“1,2,3”
- 如何将整数数组转换为字符串数组? (1,2,3)=>( “1”, “2”, “3”)
$arraylist = New-Object 'system.collections.arraylist'
$arraylist.Add(1);
$arraylist.Add(2);
$csv = ??
#($arraylist-join -',') returns error: Cannot convert value "," to type "System.Int32". Error: "Input string was not in a correct format."
将'-'前面的'-'去掉'-join':'$ arraylist -join','' –
请将它写成asnwer,它的工作 – Liero
我已经提交了答案 –