标签:
1、加载dll
Assembly ass = Assembly.LoadFile(dllPath);
2、取public的方法Type
Type[] types = ass.GetExportedTypes();
3、继承接口Ixx
types = type.Where(p=>typeof(Ixx).IsAssignableFrom(type));
4、创建实例
Ixx xx = (Ixx)Activator.CreateInstance(type);
标签:
原文地址:http://www.cnblogs.com/while-break/p/4959529.html