Get the string "System.Collections.ObjectModel.ObservableCollection" from a Type (System.type) containing a generic ObservableCollection?
- by Guillaume Cogranne
I got a Type whose FullName is (if this helps) :
"System.Collections.ObjectModel.ObservableCollection`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"
From that Type, I'd like to get "System.Collections.ObjectModel.ObservableCollection" as a string but I'd like to do it "cleanly", which means, without spliting the string with the char '`'.
I think the strategy is to get something like a Type or something else whose FullName will be "System.Collections.ObjectModel.ObservableCollection" but I really don't manage to do it :/