C# declaration of generic type

后端 未结 5 925
不知归路
不知归路 2021-01-21 06:09

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, Cultur         


        
5条回答
  •  南方客
    南方客 (楼主)
    2021-01-21 06:43

    You need to parse a string like:

    t`x[[a(,b,c,d)]]
    

    where t is actual type; x - number of generic parameters; a,b,c,d,etc - generic aguments

提交回复
热议问题