我有一堂课:
public class test<T> {}
我想得到类的类型。我有通用类型。我需要使用 typeof。
这行得通吗?
Type genericType = typeof(System.Int32);
typeof(test<>).MakeGenericType(new Type[] { genericType })
提前谢谢你的帮助
我有一堂课:
public class test<T> {}
我想得到类的类型。我有通用类型。我需要使用 typeof。
这行得通吗?
Type genericType = typeof(System.Int32);
typeof(test<>).MakeGenericType(new Type[] { genericType })
提前谢谢你的帮助