I'm working on code generation and during this task I need to create the C# representation of the typename that may contain type parameters.
E.g. I need to get "Dictionary<int, string>" from "Dictionary`2[[int], [string]]".
In the generic case this should be a lot more complex than just string replace.
Update to answer comments in questions
- I'm generating source code,
- my input is either a
Type.Fullname
as string or aType
object (as these can be easily converted to each other). - While not typical, my code should be prepared for nested type parameters.