title: Recursive Menu Builder C#
body: <p>I need to build a breadscrum/ path for a course listing site</p>
  
  <p>e.g Course has different menu items and i need to display then as below</p>
  
  <ul>
  <li>Chapter01/</li>
  <li>Chapter01/Lesson01/</li>
  <li>Chapter01/Lesson01/Exam01/</li>
  <li>Chapter01/Lesson01/Exam01/Question 03/</li>
  <li>Chapter01/Lesson01/Exam01/Question 04/Item 01</li>
  <li>Chapter01/Lesson02/</li>
  <li>Chapter02</li>
  <li>Chapter02/Lesson01</li>
  </ul>
  
  <p>Above is just an example of how the items could get arranged in a path</p>
  
  <p>In order to come up with this I have List of Items</p>
  
  <pre><code>Public Class Item
  {
      public string Level
      {
          get;
          set;
      }
  
      public string Title
      {
          get;
          set;
      }
  }
  </code></pre>
  
  <p>The List can be create as below</p>
  
  <pre><code>IList&lt;Item&gt; Items = new List&lt;Item&gt;();
  Items.Add (new Item {Level = "0", Title = "Chapter01"});
  Items.Add (new Item {Level = "1", Title = "Lesson01"});
  Items.Add (new Item {Level = "2", Title = "Exam01"});
  Items.Add (new Item {Level = "3", Title = "Question 03"});
  Items.Add (new Item {Level = "3", Title = "Question 04"});
  Items.Add (new Item {Level = "4", Title = "Item 01"});
  Items.Add (new Item {Level = "1", Title = "Lesson02"});
  
  Items.Add (new Item {Level = "0", Title = "Chapter02"});
  Items.Add (new Item {Level = "1", Title = "Lesson01"});
  </code></pre>
  
  <p>Parent item will always have the level as 0 and the children will have 1,2,3 etc...</p>
  
  <p>Can anybody helm me to come up with a recursive function in C# to achieve this </p>