日期:2014-05-18 浏览次数:20783 次
using System.Reflection; Type vType = GetType(); if (vType != null) { MethodInfo[] vMethodInfos = vType.GetMethods(); foreach (MethodInfo vMethodInfo in vMethodInfos) textBox1.AppendText(vMethodInfo.Name + "\r\n"); FieldInfo[] vFieldInfos = vType.GetFields(); foreach (FieldInfo vFieldInfo in vFieldInfos) textBox1.AppendText(vFieldInfo.Name + "\r\n"); PropertyInfo[] vPropertyInfos = vType.GetProperties(); foreach (PropertyInfo vPropertyInfo in vPropertyInfos) textBox1.AppendText(vPropertyInfo.Name + "\r\n"); }