Is there a shorter way of writing something like this:
if(x==1 || x==2 || x==3) // do something
Wha
This answer refers to a possible future version of C# ;-) If you consider switching to Visual Basic, or if Microsoft finally decides to introduce the Select Case statement to C#, it would look like this:
Select Case X Case 1, 2, 3 ... End Select