使用反射调用指定类的指定方法

Service.GetType().GetMethod(methodName).Invoke(Service, parameters);

其中Service为调用方法的实例,parameters为调用的参数

记录编程的点滴,体会学习的乐趣
原文地址:https://www.cnblogs.com/AduBlog/p/13526757.html