title: How can I compare each element of one string array to every element of another string array?
body: <p>I've got two string arrays. I want to select one element from the first array and compare to each element of the second array. If element from first array exist in elements of second array i whant to write for example ("Element exist") or something like this.</p>
  
  <p>This should be possible to do with two for loops ?</p>
  
  <p>EDIT</p>
  
  <p>Ok i finaly achived what i wanted usign this code:</p>
  
  <pre><code>string[] ArrayA = { "dog", "cat", "test", "ultra", "czkaka", "laka","kate" };
  string[] ArrayB = { "what", "car", "test", "laka","laska","kate" };
  
  bool foundSwith = false;
  
  for (int i = 0; i &lt; ArrayA.Length; i++)
  {
  
     for (int j = 0; j &lt; ArrayB.Length; j++)
     {
         if (ArrayA[i].Equals(ArrayB[j]))
         {
             foundSwith = true;
             Console.WriteLine("arrayA element: " + ArrayA[i] + " was FOUND in arrayB");
         }
     }
  
     if (foundSwith == false)
     {
        Console.WriteLine("arrayA element: " + ArrayA[i] + " was NOT found in arrayB");
     }
     foundSwith = false;
  }
  </code></pre>
  
  <p>I hope this will help others who will want to compare two arrays ;). its all about this foundSwitch. Thx for help once again.</p>