Microsoft Dev Labs has released a new version of Code Contracts . (For more information about Code Contracts in the .NET Framework 4.0, see System.Diagnostics.Contracts and this article ). If you haven't yet, I highly recommend installing the latest Code