title: Generate recursive object list in C#
body: <p>I have class models like below :</p>
  <pre><code>public class ABC
  {
      public string value { get; set; }
      public List&lt;ABC&gt; children { get; set; }
  }
  </code></pre>
  <p>And structure data like this</p>
  <pre><code>Parent   Value
    1       A
    A       C
    2       B
    B       D
  </code></pre>
  <p>I would like to recursively build an complex object. I have managed to recursively add Children to children.
  How can I return <code>List&lt;ABC&gt;</code> like results below ?</p>
  <pre><code>[
    {
      value: '1',
      children: [
        {
          value: 'A',
          children: [
            {
              value: 'C',
            },
          ],
        },
      ],
    },
    {
      value: '2',
      children: [
        {
          value: 'B',
          children: [
            {
              value: 'D',
            },
          ],
        },
      ],
    },
  ];
  </code></pre>