I have been pushing into the .Net framework in powershell and I have hit something that I don't understand. This works fine:
13# $foo = New-Object "System.Collections.Generic.Dictionary``2[System.String,System.String]"
14# $foo.Add("FOO", "BAR")
15# $foo
Key Value
--- -----
FOO BAR
This however does not:
16# $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]"
THey are both in the same assembly, so what am I missing?