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.

ContractFailedEventArgs Class

Provides methods and data for the Contract.ContractFailed event.

System.Object
  System.EventArgs
    System.Diagnostics.Contracts.ContractFailedEventArgs

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

public sealed class ContractFailedEventArgs : EventArgs

The ContractFailedEventArgs type exposes the following members.

  NameDescription
Public methodSupported by Portable Class LibraryContractFailedEventArgsProvides data for the Contract.ContractFailed event.
Top

  NameDescription
Public propertySupported by Portable Class LibraryConditionGets the condition for the failure of the contract.
Public propertySupported by Portable Class LibraryFailureKindGets the type of contract that failed.
Public propertySupported by Portable Class LibraryHandledIndicates whether the Contract.ContractFailed event has been handled.
Public propertySupported by Portable Class LibraryMessageGets the message that describes the Contract.ContractFailed event.
Public propertySupported by Portable Class LibraryOriginalExceptionGets the original exception that caused the Contract.ContractFailed event.
Public propertySupported by Portable Class LibraryUnwindIndicates whether the code contract escalation policy should be applied.
Top

  NameDescription
Public methodSupported by Portable Class LibraryEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodSupported by Portable Class LibraryGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodSupported by Portable Class LibraryGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodSupported by Portable Class LibrarySetHandledSets the ContractFailedEventArgs.Handled property to true.
Public methodSupported by Portable Class LibrarySetUnwindSets the ContractFailedEventArgs.Unwind property to true.
Public methodSupported by Portable Class LibraryToStringReturns a string that represents the current object. (Inherited from Object.)
Top

A ContractFailedEventArgs object is passed to the Contract.ContractFailed event when a contract fails. The ContractFailed event enables a managed application environment such as an interactive interpreter, a Web browser host, a test harness, or a logging infrastructure to be notified of contract failures. The event requires full trust.

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Portable Class Library

Supported in: Portable Class Library

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2015 Microsoft