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:
Try this
var res2 = new[] { 1, 2, 3 }.Any(x => x == 2);