title: Testing variable against multiple values?
body: <p>I remember seeing a question on here about the same problem, where things like:</p>
  
  <pre><code>if( x==null || x==" " || x==" " || x=="\n")...
  </code></pre>
  
  <p>End up becoming long and ugly strings, but the answer wasn't great and I can't remember what it was. </p>
  
  <p>I'm in the middle of a tutorial on MySQL, and the way the problem is solved in SQL is by using the keyword "IN". </p>
  
  <pre><code>WHERE value IN (1 , 22, 35)...
  </code></pre>
  
  <p>So I was wondering if it's considered inefficient or bad practice to do:</p>
  
  <pre><code>object[] BadVals = {null, " ", "  ", "\n"};
  if(Array.IndexOf(BadVals, x) != -1)...
  </code></pre>