PowerShell generic collections

后端 未结 3 1554
旧时难觅i
旧时难觅i 2020-12-01 01:48

I have been pushing into the .NET framework in PowerShell, and I have hit something that I don\'t understand. This works fine:

$foo = New-Object \"System.Col         


        
3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-01 01:56

    In PowerShell 2.0 the new way to create a Dictionary is:

    $object = New-Object 'system.collections.generic.dictionary[string,int]'
    

提交回复
热议问题