What is the fastest way to compare a string with an array of strings in C#2.0
If you are doing this many times with a single array, you should sort the array and binary search it:
Array.Sort(array);
int index = Array.BinarySearch(array, input);
// if (index < 0)
// does not exists, "items > ~index" are larger and "< ~index" are smaller
// otherwise, "items > index" are larger and "< index" are smaller.
Otherwise just check the whole array naively:
bool exists = Array.IndexOf(array, input) >= 0;