Thoughts on the Code Contracts Preview for .NET 4.0
Posted by: K. Scott Allen,
on 24 Feb 2009 |
View original | Bookmarked: 0 time(s)
A new Code Contracts preview is now available on DevLabs. Code Contracts will be part of the base class library in .NET 4.0 (included in mscorlib), and facilitate a Design by Contract programming approach. You can describe pre-conditions, post-conditions, and object invariants. The Code Lets borrow a couple ideas from Matts DbC post (he was using Spec#, which was a precursor) to see what Code Contracts will look like. public void Run()
{
TargetResult result = LaunchMissle(new Target());
}
public...