Is it possible to get the “c# name” of a type obtained with reflexion like:
System.Collections.Generic.List`1[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
I would like to get:
List<String>
Is it possible without splitting strings? For example, using Reflection.
Thanks!
Yes, you can do it without resorting to splitting, parsing or manipulating strings by using
CodeDomandCSharpCodeProvider:(You may need to do some additional string manipulation to remove the namespace prefix. For example, if you want the output to be
List<string>rather thanSystem.Collections.Generic.List<string>.)