title: Problem sorting lists using delegates
body: <p>I am trying to sort a list using delegates but I am getting a signature match error. The compiler says I cannot convert from an 'anonymous method' </p>
  
  <pre><code>List&lt;MyType&gt; myList = GetMyList();
  myList.Sort( delegate (MyType t1, MyType t2) { return (t1.ID &lt; t2.ID); } );
  </code></pre>
  
  <p>What am I missing?</p>
  
  <p>Here are some references I found and they do it the same way.</p>
  
  <p><a href="http://www.developerfusion.com/code/5513/sorting-and-searching-using-c-lists/" rel="noreferrer">Developer Fusion Reference</a> </p>
  
  <p><a href="http://blogs.msdn.com/devdev/archive/2006/06/30/652802.aspx" rel="noreferrer">Microsoft Reference</a></p>