See Also: ContractInvariantMethodAttribute Members
The invariant method can have any name, but it must return void and take no parameters. A suggested name for the method is ObjectInvariant. The body of the invariant method must consist solely of one or more calls to the Contract.Invariant(bool) method. A type can have more than one contract invariant method, which can be public or private.