*函数参数传递类的类型,在函数内部动态创建不同类型的实例

//获取数据列表
  public void getListData(Type type,string statement,string dtName,AjaxOutputter output)
  {
   Object _object = System.Activator.CreateInstance(type);
   IList _listData = Mapper.Instance().QueryForList(statement,_object);
   ObjectModelConverter _cvt = new ObjectModelConverter(_listData,dtName,type);
   _cvt.IsNeedMeta = true;
   output.AddResult(_cvt); 
  }

System.Activator.CreateInstance(type);
创建指定类型的类的实例;
原文地址:https://www.cnblogs.com/dwjaissk/p/604886.html