title: C# list sort by two columns
body: <p>I have a C# custom object list that I need to sort by two different variables one is a boolean and the other is a string. I can sort by <em>either</em> of the criteria, but I'm having trouble figuring out how to combine them. The sort should be all of the boolean values first (CheckedIn) and then the last name for each of the values. Right now I use</p>
  
  <pre><code>result.Sort((x, y) =&gt; string.Compare(x.CheckedIn.ToString(), y.CheckedIn.ToString()));
  result.Sort((x, y) =&gt; string.Compare(x.LastName, y.LastName));
  </code></pre>
  
  <p>But how can I combine then so that my results are like</p>
  
  <pre><code>CheckedIn-Name
  No - Aames
  No - Smith
  Yes - Barnes
  Yes - Peters
  </code></pre>