using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.Windows.Forms;

namespace ReflectionTextBox
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("属性列表-----------------------");
            Type t = typeof(System.Windows.Forms.TextBox);
            PropertyInfo[] p = t.GetProperties();
            foreach (PropertyInfo i in p)
            {
                Console.WriteLine(i);
            }
            Console.ReadLine();
            Console.WriteLine("方法列表-----------------------");
            MethodInfo[] m = t.GetMethods();
            foreach (MethodInfo i in m)
            {
                Console.WriteLine(i);
            }
            Console.ReadLine();
            Console.WriteLine("事件列表-----------------------");
            EventInfo[] e = t.GetEvents();
            foreach (EventInfo i in e)
            {
                Console.WriteLine(i);
            }
            Console.ReadLine();

        }
    }
}

相关文章:

  • 2021-07-12
  • 2021-11-25
  • 2022-12-23
  • 2022-12-23
  • 2021-05-22
  • 2021-10-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-18
  • 2022-01-25
  • 2022-02-26
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案