title: How to Handle Exceptions in Code Contracts in C#
body: <p>I've started playing with <a href="https://visualstudiogallery.msdn.microsoft.com/1ec7db13-3363-46c9-851f-1ce455f66970" rel="nofollow">Code Contracts for .NET</a>. </p>
  
  <ol>
  <li>I have installed the msi.</li>
  <li>In my sample Console application, in project properties, I have set "Assembly Molde" to "Standard Contract Requires".</li>
  <li>I have checked "Perform Runtime Contract Checking" to "Full".</li>
  </ol>
  
  <p>Having this settings, I'm using the very standard Contract.Require() in my code. I cannot put it in a try block, because it should be placed on the very top of the method's body. So, my question is how I handle the exceptions that it may throw, when the "Require()" condition is not satisfied? </p>
  
  <p>With correct input, my code runs well, with the intended bad input, it throws an unhanded exception. I think I'm missing some pieces in the big picture here, or maybe my project's contract options are not set well.</p>
  
  <p>Thanks for your help.</p>