Banner
The central idea of DbC is a metaphor on how elements of a software system collaborate with each other, on the basis of mutual obligations and benefits.

The contract is the formalization of these obligations and benefits. One could summarize design by contract by the "three questions" that the designer must repeatedly ask:

What does it expect?
What does it guarantee?
What does it maintain?

This presentation will oversee how Visual Studio 2010 and its new feature of Code Contracts will allow you to use this defensive style of programming.

Code Contracts provide a language-agnostic way to express coding assumptions in .NET-based programs. The contracts take the form of preconditions, post-conditions, and object invariants. Contracts act as checked documentation of your external and internal APIs. The contracts are used to improve testing via runtime checking, enable static contract verification, and documentation generation

Download the presentation deck here.


Connect with Us