At Microsoft Lab, they have developed a language called Spec# for extending C# long back. The extensions covered now are:
- Non-null types
- Preconditions
- Postconditions
The main outcome of this is Code Contracts .NET. For more details, http://research.microsoft.com/en-us/projects/specsharp/.