MSDN:ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.2052/cpref/html/frlrfSystemTypeClassGetMethodsTopic2.htm

解决方案 »

  1.   

    using System;
    using System.Collections;
    using System.Reflection;namespace ReflectSearchMethod
    {
    /// <summary>
    /// Class1 の概要の説明です。
    /// </summary>
    class Class1
    {
    /// <summary>
    /// アプリケーションのメイン エントリ ポイントです。
    /// </summary>
    [STAThread]
    static void Main(string[] args)
    {
    Hashtable ht = new Hashtable();
    Class1 c = new Class1();
    ht.Add(1,c);
    Type type = ht[1].GetType();
    MethodInfo[] methods = type.GetMethods();
    for( int i = 0; i<methods.Length - 1; i++)
    Console.WriteLine(methods[i].Name);
    } public void A()
    {
    Console.WriteLine("This is A method.");
    }
    protected void B()
    {
    Console.WriteLine("This is B method.");
    }
    private void C()
    {
    Console.WriteLine("This is C method.");
    }
    }
    }
      

  2.   

    MethodInfo[] methods = type.GetMethods();
    这就能取到了