title: VB.NET: sorting list by another list
body: <p>How to sort <code>somelist As List(of T)</code> by the order set in another list <code>sortorder As List(of Integer)</code>? Both <code>somelist</code> and <code>sortorder</code> are of the same size and are indexed from 0 to n. Integers in the <code>sortorder</code> list determine the sort order: new index of item X in <code>somelist</code> = value of item X in <code>sortorder</code>.</p>
  
  <p>Like this:</p>
  
  <pre><code>somelist = (itemA, itemB, itemC)
  sortorder = (3, 1, 2)
  somelist.sort()
  somelist = (itemB, itemC, itemA)
  </code></pre>
  
  <p>I am trying to sort several equally sized lists using the predefined sort order.</p>