Torna al Thread
try
{
Control ctl = new Control();
foreach (Type t in yourAssembly.GetTypes())
{
if (t.IsSubclassOf(typeof(Form)))
{
TreeNode addedForm = treeView1.Nodes.Add(t.Name);
foreach (FieldInfo field in t.GetFields(BindingFlags.Public|BindingFlags.NonPublic| BindingFlags.Instance))
{
if (field.FieldType.IsSubclassOf(typeof(Control)))
{
PropertyInfo prop = field.FieldType.GetProperty("Text");
if (prop!=null)
{
prop.GetValue(ctl, null); *****
}
addedForm.Nodes.Add(field.Name + " " + ctl.Text );
}
}
}
}
}
catch (Exception ex2)
{
MessageBox.Show(ex2.StackTrace);
}
}