Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Contract.Assert Method

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

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method Static member Supported by Portable Class Library Assert(Boolean) Checks for a condition; if the condition is false, follows the escalation policy set for the analyzer.
Public method Static member Supported by Portable Class Library 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.
Top
Show:
© 2015 Microsoft