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::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:

