Re: Reflection And Objects
Its ok problem solved, i can use:
foreach (PropertyDescriptor Params in TypeDescriptor.GetProperties(m_Object))
{
Console.WriteLine(Params.DisplayName);
}
Re: Reflection And Objects
Code:
MyObject myObj = new MyObject();
Type myObjType = typeof(MyObject);
foreach(PropertyInfo pi in myObjType.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.GetProperty)) {
string name = pi.Name;
object value = pi.GetValue(myObj, null);
}
Re: Reflection And Objects