📜  c# 在运行时加载程序集 - C# 代码示例

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

代码示例1
using System.Reflection;

var dll = Assembly.LoadFile(@"C:\assembly.dll"); // full path requied
Type type = dll.GetType("myNamespace.myClass");
dynamic c = Activator.CreateInstance(type);
c.myPublicMethod();