Tuesday, February 24, 2009

Put out a contract on your code

I always read Somasegar’s postings with interest – nearly as much as I give to ScottGu’s – and today was no exception.

In a posting today, Somesgar announced the release of a Visual Studio companion product from the DevLabs called Code Contracts for .Net.

This is exciting because it provides a mechanism for us developers to employ design-by-contract techniques in our .Net code. I’d previously rolled my own (very basic) equivalents to this, but this tool seems much superior because it includes an IL rewriter and a static checker as well as the static library used to express the contract specification. The static checker even provides suggestions for contract specifications based on the code in a method – very cool.

Plan your hit by reading about it here: http://blogs.msdn.com/somasegar/archive/2009/02/23/devlabs-code-contracts-for-net.aspx

Pull the trigger and get it here: http://msdn.microsoft.com/en-us/devlabs/dd491992.aspx

No comments: