title: LINQ: How to convert the nested hierarchical object to flatten object
body: <p>How to convert the nested hierarchical object to flatten objects by using LINQ? I know that we can easily use foreach loop to achieve that. But I'm wondering if there is a way to write it in LINQ.</p>
  
  <pre><code>class Person{
     public int ID {get;set}
     public string Name {get;set}
     public List&lt;Person&gt; Children {get;}
  }
  </code></pre>
  
  <p><strong>Data :</strong></p>
  
  <pre><code>ID   : 1
  
  Name : Jack
  
  Children
  
  2 | Rose 
  
  3 | Paul
  </code></pre>
  
  <p>I like to convert this data into flatten format like below. </p>
  
  <pre><code>1 | Jack 
  
  2 | Rose 
  
  3 | Paul
  </code></pre>
  
  <p>How can we do it with Linq?</p>