日期:2011-05-20  浏览次数:20483 次

 private string[] getMethodList(System.Type myType)
  {
   int i,l;
   MethodInfo myMethodInfo;
   MethodInfo[] myArrayMethodInfo = myType.GetMethods(BindingFlags.Public|BindingFlags.Instance|BindingFlags.DeclaredOnly);
   l = myArrayMethodInfo.Length;
   string[] methodList=new string[l];
   for(i=0;i<myArrayMethodInfo.Length;i++)
   {
    myMethodInfo = (MethodInfo)myArrayMethodInfo[i];
    methodList[i] = myMethodInfo.Name ;
   }
   return methodList;
  }