Comparing One Value To A Whole Array? (C#)
Posted
by Soo
on Stack Overflow
See other posts from Stack Overflow
or by Soo
Published on 2010-04-05T16:05:42Z
Indexed on
2010/04/05
16:13 UTC
Read the original article
Hit count: 109
Let's say I have a C# variable and array:
int variable_1 = 1;
int[3] array_1 = {1,2,3};
How can I check if the value of variable_1 is equal to any of the values in array_1 without looping through array_1?
© Stack Overflow or respective owner