pwsh的 二维数组的属性方法获取

$a = New-Object 'object[,]' 2,2 # 2-D array of length 4 
$a[0,0] = 10 
$a[0,1] = $false 
$a[1,0] = "red" 
$a[1,1] = $null

gm -inputObject $a
get-member -InputObject $a

$b = (New-Object 'int[,]' 2,2) 
$b[0,0] = 10 
$b[0,1] = 20 
$b[1,0] = 30 
$b[1,1] = 40

gm -inputObject $b
posted @ 2021-09-04 11:33  whiter001  阅读(41)  评论(0编辑  收藏  举报