title: Recursively Get Properties & Child Properties Of An Object
body: <p>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:</p>
  
  <pre><code>public class Container
  {
       public string Name { get; set; }
       public List&lt;Address&gt; Addresses { get; set; }
  }
  public class Address
  {
       public string AddressLine1 { get; set; }
       public string AddressLine2 { get; set; }
       public List&lt;Telephone&gt; Telephones { get; set; }
  }
  public class Telephone
  {
       public string CellPhone { get; set; }
  }
  </code></pre>
  
  <p>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:</p>
  
  <pre><code>Container.Name, Container.Addresses.AddressLine1, Container.Addresses.AddressLine2, Container.Addresses.Telephones.CellPhone
  </code></pre>
  
  <p>Does that make any sense? I can't seem to wrap it around my head.</p>