3
Answers

get full 'path' of nested class object?

Photo of Kunjahamed P

Kunjahamed P

4y
1.6k
1
Is it possible to get the full 'path' nested class object

ex:

  1. public class Member  
  2. {  
  3. public string Name;  
  4. public Address Address;  
  5. }  
  6. public class Address  
  7. {  
  8. public string Line1;  
  9. public string Line2;  
  10. public string Line3;  
  11. } 
Imagine I have an instance of this class named m. Is it possible to get the full path as "Member.Address.Line1" (as string), by any methods, just by  passing somehow m.Address.Line1?

Answers (3)