When you use Design by contract , it is important to have two assemblies - the final assembly, which does not check the Prerequisites , Postconditions and Class Invariants, and the debugging, which checks them (through statements ).
In some situations, prerequisite checks may be left active in release mode (search for related issues), but this does not change the whole story.
At the development stage, you check all of your contractual assumptions, and when you release, you no longer check them - you know that you tested the code and it works, so you just rely on your previous assumptions - which is why they were intended in the first place.
source share