Friday, July 20, 2007

Generics type full name representation


Just got to know how generics are represented internally, you might need it while using reflection or with WCF proxy generation or whenever you need to know your custom defined generic type.

List as

Dictionary> as System.Collections.Generic.Dictionary`2[[System.String],[System.Collections.Generic.List`1[[System.Int32]]]]

The weird '1 shows that it expects 1 parameter and '2 it expects 2 parameters, isn't it bizarre.

Rock it!