Postconditions

suggest change

Postconditions ensure that the value returned from a method matches the contract. That gives the caller a definition of the expected result. Postconditions can allow a simpler implementation, because the static analyzer rejects some outcomes that the contract forbids.

Example…

string GetValue()
{
    Contract.Ensures(Contract.Result<string>() != null);

    return null;
}

Static analysis result…

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents