In SQL, you can use the following syntax:
SELECT * FROM MY_TABLE WHERE VALUE_1 IN (1, 2, 3)
Is there an equivalent in C #? It seems that the IDE recognizes "in" as a keyword, but I seem to be unable to find any information about this.
So, is it possible to do something like the following:
int myValue = 1; if (myValue in (1, 2, 3))
Instead
int myValue = 1; if (myValue == 1 || myValue == 2 || myValue == 3)
operators c # sql in-operator
pm_2 Jul 02 '10 at 10:44 2010-07-02 10:44
source share