public void GetMethod(string method, string param)
{
string[] parames = { method, param };
Warn warn = new Warn();
MethodInfo GetMethodFromFunction = warn.GetType().GetMethod(parames[0], BindingFlags.Instance | BindingFlags.Public
| BindingFlags.NonPublic | BindingFlags.Static);
if (GetMethodFromFunction != null)
{
GetMethodFromFunction.Invoke(warn, new object[] { parames[1] });
//MessageBox.Show("找到了");
}
else
{
//LogHelper.WriteLog(DateTime.Now.ToString() + $@":未找到方法{method}");
//MessageBox.Show("找不到该方法");
}
}
08-08
1870
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交