如果对象是泛型类型,我想执行测试.我试过以下但没有成功:
public bool Test() { List<int> list = new List<int>(); return list.GetType() == typeof(List<>); }
我做错了什么,我该如何进行这项测试?
.net c# generics reflection types
.net ×1
c# ×1
generics ×1
reflection ×1
types ×1