标签:
Assembly _dll = Assembly.LoadFrom(Application.StartupPath.Trim() + "\\Student.dll");
System.Type t = _dll.GetType("Student.studentA");//命名空间.类名
object o = System.Activator.CreateInstance(t);//创建实例
System.Reflection.MethodInfo mi = t.GetMethod("Get_name");//获得方法
FieldInfo [] Fs=t.GetFields();
MessageBox.Show(mi.Invoke(o, new object[] {">>" }).ToString());//调用方法
标签:
原文地址:http://www.cnblogs.com/nonet/p/5372408.html