bev*_*qua 9 .net c# generics reflection
我正在尝试反序列化,Generic<T> where T : struct但是当我调用时,ctor.Invoke(args); 我得到异常"无法创建实例,因为Type.ContainsGenericParameters为true".
Generic<T> where T : struct
ctor.Invoke(args);
如何传递我想要的泛型类型?
Qui*_*son 11
Type.MakeGenericType 可能就是你要找的......
Type.MakeGenericType
归档时间:
14 年,7 月 前
查看次数:
8461 次
最近记录:
7 年,4 月 前