.NET tools, components, libraries and add-ins [NEW] My favorites| sign in | create your account  
ASP.NET hosting
Advertise here! Contact us to know the options

Code Contracts

 Home Page Home Page

Categories: Miscellaneous

Author: Microsoft

Latest version: 1.1.20215
Added 2009-02-27

Provides 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 bring the advantages of design-by-contract (DbC) programming to all .NET programming languages.
Two tools are provided:
- Runtime Checking: a binary rewriter modifies a program by injecting the contracts, which are checked as part of program execution. Rewritten programs improve testability: each contract acts as an oracle, giving a test run a pass/fail indication. Automatic testing tools, such as Pex, take advantage of contracts to generate more meaningful unit tests by filtering out meaningless test arguments that don't satisfy the pre-conditions.
- Static Checking: a static checker can decide if there are any contract violations without running the program. It checks for implicit contracts, such as null dereferences and array bounds, as well as the explicit contracts.

Built for .NET 2
Built for .NET 2
Free or free version available
Free or free version available
Advertise here! Contact us to know the options
Help the .NET community get a consensus on great tools. Display your favorite tools on your own website or on your blog.
Keep track of your favorite tools. Build your personal watch list.
Advertise here! Contact us to know the options
Hosted by Arvixe
part of the metaSapiens network: metaSapiens | .NET Jobs | Fabrice's weblog | .NET tools | Java tools | Dynamics AX tools | Tuneo | LINQ book | MapShares | BD indépendante | Parking partagé