title: Sorting a list of objects with it's parameter
body: <p>I'm trying to sort a list of objects in a particular order.  </p>
  
  <pre><code>Dim myList as new List(Of myObj)
  </code></pre>
  
  <p><code>myObj</code> has 2 parameters <code>Name</code> (string) and <code>ParentName</code> (string)  </p>
  
  <p>Let's say <code>myList</code> has n number of items and they are in the following order:  </p>
  
  <pre><code>myList(0): Name="MD" , ParentName = ""  
  myList(1): Name="Operations Manager" , ParentName = "MD"  
  myList(2): Name="Section Sub Manager" , ParentName = "Section Manager"  
  myList(3): Name="Assistant Manager1" , ParentName = "Tactical Manager"  
  myList(4): Name="Tactical Manager" , ParentName = "MD"  
  myList(5): Name="Assistant Manager2" , ParentName = "Tactical Manager"  
  myList(6): Name="Section Manager" , ParentName = "MD"  
  </code></pre>
  
  <p>I have to sort the above so the child nodes appear AFTER it's parent ie:  </p>
  
  <pre><code>myList(0): Name="MD" , ParentName = ""  
  myList(1): Name="Operations Manager" , ParentName = "MD"  
  myList(2): Name="Section Manager" , ParentName = "MD"  
  myList(3): Name="Section Sub Manager" , ParentName = "Section Manager" 
  myList(4): Name="Tactical Manager" , ParentName = "MD"  
  myList(5): Name="Assistant Manager1" , ParentName = "Tactical Manager"  
  myList(6): Name="Assistant Manager2" , ParentName = "Tactical Manager"  
  </code></pre>
  
  <p>please help.</p>