What is Code Contracts

Explain the Code Contracts?

E

Expert

Verified

Code Contracts enables you to express the code assumptions and statements stating the nature of code in language-neutral way. Contracts are involved in the form of pre-conditions, post-conditions and object-invariants. Contracts help to improve-testing by enabling run-time checking, documentation generation and static contract verification.

The System.Diagnostics.Contracts namespace contains static classes which enables to express the contracts in code.

   Related Questions in DOT NET Programming

©TutorsGlobe All rights reserved 2022-2023.