title: Select using linq based on 2 conditions
body: <p>I have a collection. I want to select values that matches 2 conditions.</p>
  
  <pre><code>var a;
  var b;
  foreach(SomeObject so in collection)
  {
      if(so.Value == something) 
      {
          a = so;
          // break if b is not null.
      }
      else if(so.Value == somethingElse) 
      {
          b = so;
          // break if a is not null
      }
  }
  </code></pre>
  
  <p>Is it possible to do the above using linq iterating over the collection only once? There will be only one value of something and one value of somethingElse, if we can use that fact.</p>