Hi all,
I'm creating code generator for wrappers of some c# classes. With the
introduction of c# 2.0 and generics the following problem arises.
When encountering generic types anywhere inside the assembly, for
example a generic method parameter declared as:
System.Collections.Generic.List<int>
the full name of that parameter type returned by reflection is :
"System.Collections.Generic.List`1[[System.Int32, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"
This is probably meant to allow runtime creation of that type using
Emit mechanism, I guess.
For the purpose of code generation is quite impractical, because I have
go through all generic types replacing the `1[...] part with the
desired <...>. Although this is not a complicated task, I am suprised
that there is no built-in functionality meant to do that.
Does anybody know if my task can be acomplished without manual string
operations, or the reason why MS haven't added such methods?
Thanks for any comments.
Konrad Kaczanowski