title: Filter a list on multiple criteria
body: <p>I am trying to Filter a list on Multiple columns. I know I can loop thru the list collection and filter the records, is there any better way?</p>
  
  <p>My first criteria is  <code>colA !=  “X”</code>  and if <code>colA == “Y”</code>than check for colB value for this type only.</p>
  
  <p>I have to allow all values on colA except “X” and <code>if  ColA == “Y” &amp;&amp; colB == “T”</code>  ( I check colB value only <code>if ColA == “Y”)</code>  I am not able to write this.</p>
  
  <p>Basically if ColA == “X” then don’t allow and if ColA == “Y” then check for colB value and filter depending on the value. Allow rest of all ColA values.</p>
  
  <pre><code>Accounts = Accounts.Where(acc =&gt; acc.ColA != “X” || ??).ToArray();
  </code></pre>