i have define aroubd 8 - 10 public properties in an class.
is there a way to list out the properties during runtime?
Please advise.
Printable View
i have define aroubd 8 - 10 public properties in an class.
is there a way to list out the properties during runtime?
Please advise.
(converted from my vb.net example)PHP Code:public static void GetProperties(ref Type theType)
{
PropertyInfo[][0] pi_Properties = theType.GetProperties((BindingFlags.Public | BindingFlags.Instance));
PropertyInfo pi_PropertyItem;
foreach (int pi_PropertyItem in pi_Properties) {
Console.WriteLine(pi_PropertyItem.Name);
}
}
Thanks. it works :)
Of course it does. :D