Contract::Assert Method
.NET Framework (current version)
In debug builds, performs a run-time test for a specified condition.
Assembly: mscorlib (in mscorlib.dll)
| Name | Description | |
|---|---|---|
![]() ![]() | Assert(Boolean) | Checks for a condition; if the condition is false, follows the escalation policy set for the analyzer. |
![]() ![]() | Assert(Boolean, String^) | Checks for a condition; if the condition is false, follows the escalation policy set by the analyzer and displays the specified message. |
Show:

