title: How can I make a textbox only accept a valid email?
body: <p>I would like my textbox to check if the email that is entered into the textbox is valid.</p>
  
  <p>So far I have got:</p>
  
  <pre><code>if (!this.txtEmail.Text.Contains('@') || !this.txtEmail.Text.Contains('.')) 
  { 
      MessageBox.Show("Please Enter A Valid Email", "Invalid Email", MessageBoxButtons.OK, MessageBoxIcon.Error); 
  }
  </code></pre>
  
  <p>But this only tests if it has a '@' and a '.' in it.</p>
  
  <p>Is there a way to make it check to see if it has .com etc. and only one '@'?</p>