Kunjahamed P

Kunjahamed P

  • NA
  • 376
  • 41.3k

get full 'path' of nested class object?

Jul 10 2020 3:11 AM
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)