How can I check whether multiple variables are equal to the same value?
<p>How do I compare multiple items? For example, I wish to check if all the variables A, B, and C are equal to the char 'X' or all three are equal to 'O'. (If 2 of them are X and one is O it should return false.)</p>

<p>I tried:</p>

<pre><code>if (A, B, C == 'X' || A, B, C == 'O') 
  {
    //Do whatever
  }
</code></pre>

<p>but it didn't work. What is the best way to do this?</p>
