我的理解应该不行:
IList <T>是编译时
Type a   是运行时如果要用,可以定义一个这样的类型,然后用这个来存取a:
IList <Object>

解决方案 »

  1.   

    我没有看懂 是不是这个意思啊:
    IList<T> where T:Type
      

  2.   

    public List<T> GetList<T>(type objtype,object entity)
    {
       List<T> objs = new List<T>();
       ....取数,循环赋值等操作
       return objs;
     }
      

  3.   

    我这样用行吗,我做的毕业设计是.net下的持久层框架,现在单表的操作已经ok了,现在想实现hibernate那样的多表的关联,在子查询那里要返回一个IList<T>,但是T是未知的classA
    {
        public static IList<T> GetChildList(string foreignKeyName, object value,T type)
        {
        }
    }