Assert Method

Contract.Assert Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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.

  NameDescription
Public method Static member Assert(Boolean) Checks for a condition; if the condition is false, follows the escalation policy set for the analyzer.
Public method Static member 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:
© 2016 Microsoft