I've started playing with Code Contracts for .NET.
- I have installed the msi.
- In my sample Console application, in project properties, I have set "Assembly Molde" to "Standard Contract Requires".
- I have checked "Perform Runtime Contract Checking" to "Full".
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?
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.
Thanks for your help.