title: C# flatten a list of objects with a list property
body: <p>Given the following object:</p>
  
  <pre><code>public class Person
  {
      public string Name {get; set;}
  
      public string Age {get; set;}
  
      public list&lt;string&gt; Interests {get; set;}
  }
  </code></pre>
  
  <p>Is there a nice one line linq way to flatten this (I'm open to extension methods) so that if for example we have </p>
  
  <pre><code>var People = new List&lt;Person&gt;(){
      new Person(){
          Name = "Bill",
          Age  = 40,
          Interests = new List&lt;string&gt;(){"Football", "Reading"}
      },
      new Person = new List&lt;Person&gt;(){
          Name = "John",
          Age = 32,
          Interests = new List&lt;string&gt;(){ "Gameshows", "Reading"}
      },
      new Person = new List&lt;Person&gt;(){
          Name = "Bill",
          Age = 40,
          Interests = new List&lt;string&gt;(){ "Golf"} 
      }
  } 
  </code></pre>
  
  <p>We can get a result of (i.e, AddRange to the <code>Interests</code> list property if other properties match):</p>
  
  <pre><code>{
      {
          Name = "Bill",
          Age  = 40,
          Interests = {"Football", "Reading", "Golf"}
      },
      {
          Name = "John",
          Age = 32,
          Interests = { "Gameshows", "Reading"}
      }
  } 
  </code></pre>