我有:
class Car {..} class Other{ List<T> GetAll(){..} }
我想要做:
Type t = typeof(Car); List<t> Cars = GetAll<t>();
我怎样才能做到这一点?
我想从运行时使用反射发现的类型的数据库中返回一个泛型集合.
c# generics casting runtime
c# ×1
casting ×1
generics ×1
runtime ×1