Is there another way to write something like this:
if (a == x || a == y || a == z)
One way that I found is doing it like this:
For instance, your logic is like that:
if(a==x || a== y|| a==z) { DoSomething(); } else { DoOtherThings(); }
will equivalent to:
if(a!=x&& a != y && a!= z) { DoOtherThings(); } else { DoSomething(); }
Cheers.