Compare Items in Two Arrays

  • Thread starter Thread starter Gabe Matteson
  • Start date Start date
G

Gabe Matteson

How would I compare two arrays and find if anything in Array 1 exists in
Array 2 or visvera? Thank you.
 
Gabe Matteson said:
How would I compare two arrays and find if anything in Array 1
exists in Array 2 or visvera? Thank you.


Write two loops and search for each item in the other array. In VB 2008,
you can make use of the 'Contains' extension method (eg
Array1.Contains(value))


Armin
 
Write two loops and search for each item in the other array. In VB 2008,
you can make use of the 'Contains' extension method (eg
Array1.Contains(value))

Armin

In VB2005 there are "exists" and "find(and its derivations)" functions
but usage may depend on array.
 
Back
Top