日期:2014-05-18 浏览次数:20737 次
Assembly asm = Assembly.LoadFile(dll文件路径); string typeName = "DLLTest.Invoker"; Type ikt = asm.GetType(typeName); MethodInfo ikm = ikt.GetMethod("Invoke", BindingFlags.Instance | BindingFlags.Public); object ins = asm.CreateInstance(typeName); bool result = (bool)ikm.Invoke(ins, new object[] { 0 });