Compare Items in Two Arrays

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gabe Matteson

    Compare Items in Two Arrays

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


  • Armin Zingler

    #2
    Re: Compare Items in Two Arrays

    "Gabe Matteson" <gmatteson@inqu ery.biz.nospams chrieb
    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

    Comment

    • kimiraikkonen

      #3
      Re: Compare Items in Two Arrays

      On Apr 10, 12:42 pm, "Armin Zingler" <az.nos...@free net.dewrote:
      "Gabe Matteson" <gmatte...@inqu ery.biz.nospams chrieb
      >
      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
      In VB2005 there are "exists" and "find(and its derivations)" functions
      but usage may depend on array.

      Comment

      Working...