Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ContractFailureKind Enumeration

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)

type 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