KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Ok so at first I thought this was easy enough, and maybe it is and I'm just too tired - but here's what I'm trying to do. Say I have the following objects: public class Container { public string Name { get; set; } public List<Address> Addresses { get; set; } } public class Address { public string AddressLine1 { get; set; } public string AddressLine2 { get; set; } public List<Telephone> Telephones { get; set; } } public class Telephone { public string CellPhone { get; set; } } What I need to be able to do, is 'flatten' Containers property names in to a string (including ALL child properties AND child properties of child properties) that would look something like this: Container.Name, Container.Addresses.AddressLine1, Container.Addresses.AddressLine2, Container.Addresses.Telephones.CellPhone Does that make any sense? I can't seem to wrap it around my head.
Tags (comma-separated)
Save Edits
Cancel