title: Try..Catch blocks always expensive?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1308432/do-try-catch-blocks-hurt-performance-when-exceptions-are-not-thrown">Do try/catch blocks hurt performance when exceptions are not thrown?</a>  </p>
  </blockquote>
  
  <p>Hey everyone, 
   Just a quick question about try..catch blocks. I've heard they're expensive to use and shouldn't be used as part of a program's flow. However, in order to validate email addresses, I'm using the following code.</p>
  
  <pre><code>        try
          {
              MailAddress checkEmail = new MailAddress(testEmail);
  
              return true;
          }
          catch
          {
              return false;
          }
  </code></pre>
  
  <p>Due to prior validation, I don't many exceptions to be caught unless it's an attempt to bypass validation. My question is, are Try...Catch blocks only expensive if an exception is caught, or is it <em>always</em> expensive regardless of whether any exception is thrown?</p>
  
  <p>Thanks </p>
  
  <p><em>EDIT</em> : Thanks for all the replies. I've decided that since the checking (in C#) isn't very expensive, I'll stick with this method. It's mainly because an actual exception being thrown is rare since there are prior validation steps that ensure no one accidentally enters an invalid email address.</p>