object obj = Activator.CreateInstance(objectType);// 创建实例
反射创建一个实例
MethodInfo methodInfo = obj.GetType().GetMethod("Parse");
//调用里面的Parse 方法 这个方法需要参数 List
methodInfo.Invoke(obj, new object[]{items});
//items 是List类型的参数 ,这样应该没错吧 。但是 在Invoke 是报错了。
类型“System.Collections.Generic.List1[ORMTool.SerializabBaseObject]”的对象无法转换为类型“System.Collections.Generic.List
1[ORMTool.SerializabBaseObject]”。
类型是一样的 为什么会不能转换呢?
objectType是哪里来的
泛型方法要用Type.MakeGenericType 创建
泛型类型要用Type.MakeGenericType 创建