|
-
Aug 27th, 2010, 10:19 AM
#1
Code Contracts for Visual Studio 2008/2010
Microsoft DevLabs “Code Contracts” is a tool for VS2008 and VS2010 which in short provides you with methods to ensure logic of your code is tighter by running diagnostics at compile time and runtime.
Microsoft’s definition
Code Contracts provide a language-agnostic way to express coding assumptions in .NET programs. The contracts take the form of preconditions, postconditions, and object invariants. Contracts act as checked documentation of your external and internal APIs. The contracts are used to improve testing via runtime checking, enable static contract verification, and documentation generation.
I think that using contracts can greatly assist with writing tigher code along with your contract code may stay in the project and turned off in the project properties window. The best way to learn how to use contracts is by watching videos on the sites listed below or after installing contracts run the C# examples.
On the web
http://msdn.microsoft.com/en-us/devlabs/dd491992.aspx
http://research.microsoft.com/en-us/projects/contracts/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|