title: Getting all items in a list that have a property set to the same value
body: <p>Say I have a list, <code>List&lt;Foo&gt; SomeList</code>, and <code>Foo</code> is a class that has two properties, <code>Bar</code> and <code>Baz</code>.</p>
  
  <p>Is there a LINQ query that will allow me to select all the items of type <code>Foo</code> that share the same value for <code>Bar</code>, so they can be processed together?</p>
  
  <p>Something like:</p>
  
  <pre><code>foreach (List&lt;Foo&gt; foos in SomeList.SelectBy (x =&gt; x.Bar))
  {
  // process foos
  }
  </code></pre>
  
  <p>so that all the <code>Foo</code> items with <code>Bar = 0</code> are processed first, then those with <code>Bar</code> set to 1, and so on and so forth.</p>
  
  <p>Can this be done easily, or do I need to write that functionality myself?</p>