Code Contracts

Established: October 28, 2008

Code Contracts provide a language-agnostic way to express coding assumptions in .NET programs. The contracts take the form of preconditions, postconditions, 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.

Code Contracts is now Open Source!

Code Contracts is now an open source project in GitHub. This page is being kept for historical interest. All downloads, documentation, and discussions take place there.

It is just one of the many projects that are part of the Open Source for Academics program.