private void button1_Click(object sender, EventArgs e)
{
//find Out Which Methods Are there In Class1 Programatically
Type mytype = typeof(Class1);
MethodInfo[] methodsInClass = mytype.GetMethods();
listBox1.Items.Clear();
foreach (MethodInfo minfo in methodsInClass)
{
listBox1.Items.Add(minfo.Name);
}
//Find Which Constructors are there in Class1
ConstructorInfo[] constructorInfo = mytype.GetConstructors();
listBox2.Items.Clear();
foreach (ConstructorInfo cinfo in constructorInfo)
{
listBox2.Items.Add(cinfo.Name);
}
//Find Which Datamembers Are there in Class1
PropertyInfo[] pInfo = mytype.GetProperties();
listBox3.Items.Clear();
foreach (PropertyInfo pinfo in pInfo)
{
listBox3.Items.Add(pinfo.Name);
}
}