title: LINQ OrderBy with more than one field
body: <p>I have a list that I need sorted by two fields.  I've tried using OrderBy in LINQ but that only allows me to specify one field.  I'm looking for the list to be sorted by the first field and then if there are any duplicates in the first field to sort by the second field.</p>
  
  <p>For example I want the results to look like this (sorted by last name then first name).</p>
  
  <ul>
  <li>Adams, John</li>
  <li>Smith, James</li>
  <li>Smith, Peter</li>
  <li>Thompson, Fred</li>
  </ul>
  
  <p>I've seen that you can use the <a href="https://stackoverflow.com/questions/499621/multiple-orderby-in-this-linq-code">SQL like syntax to accomplish this</a> but I am looking for a way to do it with the OrderBy method.</p>
  
  <pre><code>IList&lt;Person&gt; listOfPeople = /*The list is filled somehow.*/
  IEnumerable&lt;Person&gt; sortedListOfPeople = listOfPeople.OrderBy(aPerson =&gt; aPerson.LastName, aPerson.FirstName); //This doesn't work.
  </code></pre>