(to add to Exo) You can use the devlabs contracts, but sadly - presently at least - code contracts will
not gain traction, consequent to the full features being only available to Visual Studio Team System.
Apparently Microsoft think that only Visual Studio team system developers want to build robust code - the rest of us like creating leaky code full of null checks. If you have the time or willingness then please vote at
If you really want to understand code contracts, then Charles has one of my favorite ever interviews going on about sleeping barbers on Channel 9 with
Bertrand Meyer. It's ad-hoc, unscripted and deeply enlightening. Make you see just how slow the world of programming tends to
really move, and what the result of being passionate about something (like contracts) results in.
Eiffel is adding null-safety to the language (called void-safety in Eiffel), see this paper