Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ContractFailureKind Enumeration

Specifies the type of contract that failed.

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

public enum ContractFailureKind

Member nameDescription
Supported by Portable Class LibraryAssertAn Assert contract failed.
Supported by Portable Class LibraryAssumeAn Assume contract failed.
Supported by Portable Class LibraryInvariantAn Invariant contract failed.
Supported by Portable Class LibraryPostconditionAn Ensures contract failed.
Supported by Portable Class LibraryPostconditionOnExceptionAn EnsuresOnThrow contract failed.
Supported by Portable Class LibraryPreconditionA Requires contract failed.

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

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8

Portable Class Library

Supported in: Portable Class Library
Show:
© 2015 Microsoft