ContractFailureKind Enumeration

May 11, 2014

Specifies the type of contract that failed.

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

public enum ContractFailureKind

Member nameDescription
AssertAn Assert contract failed.
AssumeAn Assume contract failed.
InvariantAn Invariant contract failed.
PostconditionAn Ensures contract failed.
PostconditionOnExceptionAn EnsuresOnThrow contract failed.
PreconditionA Requires contract failed.

The ContractFailureKind enumeration is used by the System.Diagnostics.Contracts.ContractFailedEventArgs class.

Windows Phone OS

Supported in: 8.1, 8.0

© 2014 Microsoft