代码如下: public object ExecuteSense(string senseMethod)
{
object result = null;
Console.WriteLine(this.GetType());
System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(senseMethod);//获取具体的函数方法
if (methodInfo is System.Reflection.MethodInfo && methodInfo.IsPublic)
result = methodInfo.Invoke(this, new object[] { });//在此会弹射出 异常
return result;
总会显示“参数个数不匹配” 求解
潇湘沐