📜  给定类名字符串c#代码示例创建类的实例

📅  最后修改于: 2022-03-11 14:48:59.806000             🧑  作者: Mango

代码示例1
public object GetInstance(string strFullyQualifiedName)
{         
     Type t = Type.GetType(strFullyQualifiedName); 
     return  Activator.CreateInstance(t);         
}