Windows apps
Collapse the table of content
Expand the table of content
Information
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

 

In debug builds, performs a run-time test for a specified condition.

Namespace:   System.Diagnostics.Contracts
Assembly:  mscorlib (in mscorlib.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticAssert(Boolean)

Checks for a condition; if the condition is false, follows the escalation policy set for the analyzer.

System_CAPS_pubmethodSystem_CAPS_staticAssert(Boolean, String^)

Checks for a condition; if the condition is false, follows the escalation policy set by the analyzer and displays the specified message.

Return to top
Show:
© 2017 Microsoft