📜  c# 如何从字符串中加载类的类型 - C# 代码示例

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

代码示例1
Assembly asm = Assembly.LoadFrom("file path to your assembly");

Type typ = asm.GetType("MyOrg.MyApp.Services.Example, MyOrg.MyApp.Services");

object instance =  Activator.CreateInstance(typ);