Contract::Requires Method
Specifies a precondition contract for an enclosing method or property.
Assembly: mscorlib (in mscorlib.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | Requires(Boolean) | Specifies a precondition contract for the enclosing method or property. |
![]() ![]() | Requires(Boolean, String^) | Specifies a precondition contract for the enclosing method or property, and displays a message if the condition for the contract fails. |
![]() ![]() | Requires<TException>(Boolean) | Specifies a precondition contract for the enclosing method or property, and throws an exception if the condition for the contract fails. |
![]() ![]() | Requires<TException>(Boolean, String^) | Specifies a precondition contract for the enclosing method or property, and throws an exception with the provided message if the condition for the contract fails. |

