Home > Articles > Programming > Windows Programming

  • Print
  • + Share This
Like this article? We recommend Summary


The System.Diagnostics.Contracts namespace provides a language-agnostic way to describe code contracts in the form of pre-conditions, post-conditions, and invariants. When used in combination with the code contracts tools, they can be used to improve testing through runtime checking, perform static contract verification, and produce documentation based on expanded XML documentation comments.

This article only serves as an introduction to the code contract capabilities provided by the .NET Framework, but should give you a good foundation on which to build up more complex code contract scenarios and uses.

  • + Share This
  • 🔖 Save To Your Account