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 =
Or using System.Linq...
System.Linq
(VB.NET)
Enumerable.Contains({1, 2, 4, 7}, value)
or
{1, 2, 4, 7}.Contains(value)
(C#)
Enumerable.Contains(new int[]{1, 2, 4, 7}, value);
new int[] {1, 2, 4, 7}.Contains(value);