In .net (c# or vb) expressions, how would you implement SQL\'s handy IN() functionality?
i.e. value in (1, 2, 4, 7)
rather than:
value = 1 or value =
You can use Contains() method on the list.
int myValue = 1; List checkValues = new List { 1, 2, 3 }; if (checkValues.Contains(myValue)) // Do something