📅  最后修改于: 2022-03-11 14:49:00.255000             🧑  作者: Mango
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();