// 动态调用方法 Type p = GetType(); object o = Activator.CreateInstance(p); MethodInfo mi = p.GetMethod("方法名"); object result = (mi != null) ? mi.Invoke(o, new object[] { context }) : "";
// 动态调用方法 Type p = GetType(); object o = Activator.CreateInstance(p); MethodInfo mi = p.GetMethod("方法名"); object result = (mi != null) ? mi.Invoke(o, new object[] { context }) : "";
转载于:https://www.cnblogs.com/yipu/archive/2013/02/28/2936393.html