Setting Contracts Properties

You set code contracts properties by first opening My Project and then clicking the Code Contracts tab, as shown in Figure 59.16.

Figure 59.16 Accessing code contracts settings.

image

Notice how you can enable general settings, such as runtime checking and static checking, and specific settings for both profiles. Particularly, for runtime checking you should leave the default Full selection if you have both preconditions and post-conditions. If you want to enable static checking, too, for compile time contracts checking, by default the Check in Background option is also selected. This enables the background compiler to check ...

Get Visual Basic® 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.