While at TechEd Europe in November 2009 I had a chance to catch up with the two lead developers of the Pex team Peli de Halleux and Nikolai Tillmann to talk about Code Contracts.
Code Contracts contains a common library (System.Diagnostics.Contracts) for expressing pre-conditions, post-conditions and invariants which any tool writer can take advantage of. A number of tools are available on devlabs including a documentation extracter and a static analysis tool. Code Contracts works with .Net 4 and .Net 2.
Hear why Code Contracts is a better way of implementing assertions including enabling the conditons to be specified against interfaces - sweet!
Download/Play MSDN Flash Show 013