Yash

Yash

  • NA
  • 5
  • 6.6k

Getting all properties of an object

Oct 24 2007 8:15 AM

Hi friends,

        Getting straight to the question....

        I understand that I can access property  like

       objA.Prop1.....through reflection as,

        Type myType = objA.GetType();

           PropertyInfo myProperty = myType.GetProperty("Prop1");

 But suppose I want to access property like

      objA.Prop1.Prop2 ...then how to retrive that value and also how to set that using reflection.

Thanks !!


Answers (3)