He estado adentrándome en .NET Framework en PowerShell, y he llegado a algo que no entiendo. Esto funciona bien:Colecciones genéricas de PowerShell
$foo = New-Object "System.Collections.Generic.Dictionary``2[System.String,System.String]"
$foo.Add("FOO", "BAR")
$foo
Key Value
--- -----
FOO BAR
Sin embargo, esto no lo hace:
$bar = New-Object "System.Collections.Generic.SortedDictionary``2[System.String,System.String]"
New-Object : Cannot find type [System.Collections.Generic.SortedDictionary`2[System.String,System.String]]: make sure t
he assembly containing this type is loaded.
At line:1 char:18
+ $bar = New-Object <<<< "System.Collections.Generic.SortedDictionary``2[System.String,System.String]"
Ambos están en el mismo conjunto, así que lo que me estoy perdiendo?
Como se señaló en las respuestas, esto es más o menos un problema con PowerShell v1.
¿Hay alguna referencia que describa esta sintaxis? Estoy tratando de implementar BeginInvoke desde un objeto Powershell y estoy perdiendo el tiempo con el uso de los parámetros de entrada y salida en una de las sobrecargas para él. Parece que no puedo obtener la declaración correcta. –