title: Sort a List<T> by enum where enum is out of order
body: <p>I have a List of messages.
  Each message has a type.</p>
  
  <pre><code>public enum MessageType
  {
      Foo = 0,
      Bar = 1,
      Boo = 2,
      Doo = 3
  }
  </code></pre>
  
  <p>The enum names are arbitrary and cannot be changed.</p>
  
  <p>I need to return the list sorted as: Boo, Bar, Foo, Doo</p>
  
  <p>My current solution is to create a tempList, add the values in the order I want, return the new list.</p>
  
  <pre><code>List&lt;Message&gt; tempList = new List&lt;Message&gt;();
  tempList.AddRange(messageList.Where(m =&gt; m.MessageType == MessageType.Boo));
  tempList.AddRange(messageList.Where(m =&gt; m.MessageType == MessageType.Bar));
  tempList.AddRange(messageList.Where(m =&gt; m.MessageType == MessageType.Foo));
  tempList.AddRange(messageList.Where(m =&gt; m.MessageType == MessageType.Doo));
  messageList = tempList;
  </code></pre>
  
  <p>How can I do this with an <a href="http://msdn.microsoft.com/en-us/library/xh5ks3b3.aspx" rel="noreferrer">IComparer</a>?</p>