Postconditions
suggest changePostconditions ensure that the returned results from a method will match the provided definition. This provides the caller with a definition of the expected result. Postconditions may allowed for simplied implmentations as some possible outcomes can be provided by the static analyizer.
Example…
string GetValue()
{
Contract.Ensures(Contract.Result<string>() != null);
return null;
}
Static Analyis Result…
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents