title: Is Linq faster than a foreach and how to replace the loop with it?
body: <p>i want to completely remove foreach.</p>
  
  <p>here are my code </p>
  
  <pre><code>foreach (var user in elite.Users)
  {
      if (user.UserName==txtuser.Text &amp;&amp; user.UserPWD==txtpass.Text)
      {                    
          MainForm mainForm = new MainForm();
          mainForm.ShowDialog();
          Hide();
          Close();
      }
  }
  </code></pre>