| Start |
|---|
| Contracts for Interfaces Using Code Contracts it is possible to apply a contract to an interface. This is done by declaring an abstract class that implments the interfaces. The interface should be tagged with the C# Example... Static Analysis Result... |
| Preconditions Preconditions allows methods to provide minimum required values for input parameters Example... Static Analysis Result... |
| Postconditions Postconditions 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... Static Analyis Result... |
| Installing and Enabling Code Contracts While Under After the tools are installed you must enable RemarksCode contracts allow for compile or runtime analysis of pre/post conditions of methods and invariant conditions for objects. These conditions may be used to ensure callers and return value match valid states for application processing. Other uses for Code Contracts include documentation generation. |
Read Article
https://develop.horje.com/learn/1434/reference