You could do something line by line:
new int[] { 10,11,12 }.Contains(productTypeID);
or further create an extension for int line by line:
public static bool In(this int i, params int[] ints) { return ints.Contains(i); }
Using:
if (productTypeID.In(10,11,12)) { ... }
I would not say that they are the most effective, but maybe yes.
Quintin robinson
source share