Let\'s say I have two arrays:
int ArrayA[] = {5, 17, 150, 230, 285}; int ArrayB[] = {7, 11, 57, 110, 230, 250};
int ArrayA[] = {5, 17, 150, 230, 285};
int ArrayB[] = {7, 11, 57, 110, 230, 250};
Both arrays a
If you are using C# 3.0 then why not take advantage of LINQ here?
ArrayA.Intersect(ArrayB).Any()
Not only is this generic (works for any comparable type) the implementation under the hood is pretty efficient (uses a hashing algorithm).