title: How to Order/Sort List<T> using Lambda expression in C#5?
body: <p>I'm converting my application from .Net 4.0 to .Net 4.5 Framework and there is a change in the <code>List&lt;&gt;</code> definition.
  My old code looked like this (.Net 4.0):</p>
  
  <pre><code>List&lt;Customer&gt; list = new List&lt;Customer&gt;();
  list.Add(new Customer("Smith", "John", "Sydney", 45));    
  list.Add(new Customer("Mitchell", "Brad", "New York", 52));
  list.Add(new Customer("Baker", "William", "Cape Town", 21)); 
  list.OrderBy(x =&gt; x.Name);
  </code></pre>
  
  <p>Using .Net 4.5 (C#5) the <code>List&lt;T&gt;.OrderBy()</code> method is gone and only <a href="http://msdn.microsoft.com/de-de/library/vstudio/3da4abas.aspx" rel="nofollow"><code>List&lt;T&gt;.Sort()</code></a> is available, but it looks like there is no possibility to use a Lambda expression with this method.</p>
  
  <p>Is there any option other than defining a <code>IComparer</code> for every <code>&lt;T&gt;</code>?
  If there is really no option for a Lambda expression, I could life with a generic <code>IComparer</code>, but how to choose the property to be compared?</p>
  
  <p>Solved/Edit:</p>
  
  <pre><code>using Linq;
  [...]
  List&lt;Customer&gt; list = new List&lt;Customer&gt;();
  list.Add(new Customer("Smith", "John", "Sydney", 45));    
  list.Add(new Customer("Mitchell", "Brad", "New York", 52));
  list.Add(new Customer("Baker", "William", "Cape Town", 21)); 
  list.OrderBy(x =&gt; x.Name); //list stays unordered
  list = list.OrderBy(x =&gt; x.Name).ToList();  // list content is now ordered
  </code></pre>