C#通过对象类型创建对象实例
object[] paramObject = new object[] {}; object obj = Activator.CreateInstance(type, paramObject);
或者
string className = "MyType"; MyType myType = (MyType) Activator.CreateInstance(Type.GetType(className), new object[]{});
C#通过对象类型创建对象实例
object[] paramObject = new object[] {}; object obj = Activator.CreateInstance(type, paramObject);
或者
string className = "MyType"; MyType myType = (MyType) Activator.CreateInstance(Type.GetType(className), new object[]{});