日期:2014-05-18 浏览次数:21320 次
public static class ClassA
{
public static object Method1(string str){}
public static object Method1<T>(IList<T> list){}
}
MethodInfo[] ms = Type.GetType("WindowsApplication1.ClassA").GetMethods();
foreach (MethodInfo info in ms)
{
if (info.Name == "Method1" && info.IsGenericMethod)
{
MessageBox.Show("ok");
break;
}
}
------解决方案--------------------