MSDN:ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.2052/cpref/html/frlrfSystemTypeClassGetMethodsTopic2.htm
解决方案 »
- 想全面学习AJAX,找不到合适的教材,大家给点建议吧
- 不知道是不是思路问题【-。-】
- 请问一下,有些类 继承至 IDisposable,是什么意思啊!!
- 有没必要写成函数的一点疑问
- 如何将string数组中的某个单个字符元素取出为char型字符?
- 错误 1 找不到类型或命名空间名称“Form1”(是否缺少 using 指令或程序集引用?)
- 如何用ado.net 创建Access 数据库
- C# WinForm编程:点击某一按钮,该按钮颜色改变,其他按钮颜色无变化。在点击另一个按钮,该按钮颜色改变,其他按钮颜色变成一个颜色。
- 委托异步调用 GC.collect()方法无法释放内存
- 自定义的结构类型能否做为输出参数?
- 初学者的问题,请虾米们帮忙哦!!!!给变量赋值的问题
- 请问各位大大这样怎么不能成功插入数据呢?
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.");
}
}
}
这就能取到了