Assertions and Assumptions

The Contract class provides an Assert method that is used for verifying a condition at a particular point in the program execution. Typically you use it as follows:

Contract.Assert(Width > 0)

There is also another method named Assume, which works exactly like Assert but is used when static verification is not sufficient to prove the condition you are attempting to check.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.243.175