"Contracts allow you to express preconditions, postconditions and object invariants in your code for runtimeКажется, это уже было в Smalltalk. Теперь вот возвращается :-)
checking, static analysis, and documentation. This document covers how to author them in your code, and
contains guidelines for using them eectively with the provided tools.
All of the contract methods are static methods dened in the Contract class which appears in the
System.Diagnostics .Contracts namespace."
http://msdn.microsoft.com/en-us/devlabs/dd491992.aspx
http://research.microsoft.com/en-us/projects/contracts/userdoc.pdf
Code Contracts обещают встроить в C# 4.0 и MSVS 2010. Сейчас доступен в виде библиотеки