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:
I often use an extension method that mimics SQLs IN:
IN
public static bool IsIn(this T obj, params T[] collection) { return collection.Contains(obj); }
That way I can do
if(a.IsIn(b, c, d)) { ... }