使用反射(Reflect)获取dll文件中的类型并调用方法,具体内容如下
需引用:System.Reflection;
1. 使用反射(Reflect)获取dll文件中的类型并调用方法(入门案例)
static void Main(string[] args)
{
//dll文件路径
string path = @D:\VS2015Project\001\Computer\bin\Debug\computer.dll;
//加载dll文件
Assembly asm = Assembly.LoadFile(path);
/