C#提取类型的所有方法和参数

private void Form1_Load(object sender, EventArgs e)
        {
            //MessageBox.Show(GetDoubleClickTime().ToString());
           Type type = typeof(string);
            foreach (var item in type.GetMethods())
            {
                richTextBox1.AppendText("方法名称:" + item.Name + "( ");
                foreach (var item1 in item.GetParameters())
                {
                    richTextBox1.AppendText(" 参数:" + item1.Name);
                }
                richTextBox1.AppendText(" )" + Environment.NewLine);
            }
        }

  

posted @ 2020-04-15 17:27  星空沃土  阅读(942)  评论(0编辑  收藏  举报