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.

System.Diagnostics.Contracts Namespace

Contains static classes for representing program contracts such as preconditions, postconditions, and invariants.

  Class Description
Public class Contract Contains static methods for representing program contracts such as preconditions, postconditions, and object invariants.
Public class ContractClassAttribute Specifies that a separate type contains the code contracts for this type.
Public class ContractClassForAttribute Specifies that a class is a contract for a type.
Public class ContractInvariantMethodAttribute Marks a method as being the invariant method for a class.
Public class ContractPublicPropertyNameAttribute Specifies that a field can be used in method contracts when the field has less visibility than the method.
Public class ContractReferenceAssemblyAttribute Specifies that an assembly is a reference assembly that contains contracts.
Public class ContractRuntimeIgnoredAttribute Identifies a member that has no run-time behavior.
Public class ContractVerificationAttribute Instructs analysis tools to assume the correctness of an assembly, type, or member without performing static verification.
Public class PureAttribute Indicates that a type or method is pure, that is, it does not make any visible state changes.

  Enumeration Description
Public enumeration ContractFailureKind Specifies the type of contract that failed.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft