下邊代碼內容是關於C#通過對象類型創建對象實例的代碼。
object[] paramObject = new object[] {};
object obj = Activator.CreateInstance(type, paramObject);
或者
string className = "MyType";
MyType myType = (MyType) Activator.CreateInstance(Type.GetType(className), new object[]{});