Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell-声明大小为的对象的空数组_Powershell - Fatal编程技术网

Powershell-声明大小为的对象的空数组

Powershell-声明大小为的对象的空数组,powershell,Powershell,如何在Powershell中声明空对象数组并指定大小 我基本上想将此C#代码转换为Powershell: Object[] objects = new Object[5]; $objects=新对象[]5 或 $objects=[Array]::CreateInstance([Object],5)

如何在Powershell中声明空对象数组并指定大小

我基本上想将此C#代码转换为Powershell:

Object[] objects = new Object[5];
$objects=新对象[]5

$objects=[Array]::CreateInstance([Object],5)