title: Array.Exist() only recognizing last element of an array
body: <p>I apologize if this is an obvious answer, but I couldn't find anything related to this behavior on StackOverflow nor on Google. I'm self-teaching c# and am writing a program that involves the use of username/password pairs. In this case, I am using <code>.Exist()</code> to determine if a username is already in my array of usernames.</p>
  
  <pre><code>    static bool LookUpS(string targ, string[] arr)
      {
          if (Array.Exists(arr, e =&gt; e == targ))
          {
              return true;
          }
          else
          {
              return false;
          }
      }
  </code></pre>
  
  <p>The argument <code>targ</code> comes from the user, and the argument <code>arr</code> is written into the program to specify which array should be searched (this is so that I can use <code>LookUpS</code> on different arrays). The array that I'm testing right now is derived from a text document. I've tested to confirm that the transition from .txt to array is working properly.</p>
  
  <p>Now to the actual issue. I've filled the text document in question with a few values: "Jupiter", "Neptune", "Saturn", "Mars". If I pass any of the first three into <code>LookUpS</code>, it returns <code>false</code> despite the fact that they do exist. The part I don't understand, however, is that if I pass "Mars" (or whatever the last value happens to be) into the function, it returns <code>true</code> like it should. If I were to remove the "Mars" value, <code>LookUpS</code> would say that "Saturn" is <code>true</code> but not the others. Can anyone offer some explanation for this? I can post a more complete picture of the program if that would help in identifying the problem.</p>