How can I get the correct text definition of a generic type using reflection?

前端 未结 6 1333
萌比男神i
萌比男神i 2020-12-01 14:17

I am working on code generation and ran into a snag with generics. Here is a \"simplified\" version of what is causing me issues.

Dictionary

        
6条回答
  •  一整个雨季
    2020-12-01 14:37

    I don't think .NET has anything built-in that would do this, so you will have to do it yourself. I think that the reflection classes provide quite enough information to reconstruct the type name in this form.

提交回复
热议问题