ContractFailureKind Enumeration

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Specifies the type of contract that failed.

Namespace:  System.Diagnostics.Contracts
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Enumeration ContractFailureKind
public enum ContractFailureKind

Members

Member name Description
Precondition A Requires contract failed.
Postcondition An Ensures contract failed.
PostconditionOnException An EnsuresOnThrow contract failed.
Invariant An Invariant contract failed.
Assert An Assert contract failed.
Assume An Assume contract failed.

Remarks

The ContractFailureKind enumeration is used by the ContractFailedEventArgs class.

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.