The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
Contract::Invariant Method
.NET Framework (current version)
Specifies a contract for an enclosing method or property.
Assembly: mscorlib (in mscorlib.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | Invariant(Boolean) | Specifies an invariant contract for the enclosing method or property. |
![]() ![]() | Invariant(Boolean, String^) | Specifies an invariant contract for the enclosing method or property, and displays a message if the condition for the contract fails. |
Show:

