mscorlib 4.0.0.0 System.Attribute System.AttributeUsage(System.AttributeTargets.Class, Inherited=false) System.Diagnostics.Conditional("CONTRACTS_FULL")

Types that are marked with this attribute represent a code contract for another type. The type that the contract applies to is specified in the constructor.

Specifies that a class is a contract for a type.

- Constructor
  4.0.0.0

  The following example shows how to use the constructor to specify that the contracts in the type apply to the IArray interface. This code example is part of a larger example provided for the class.

  code reference: ContractExample#4

  Initializes a new instance of the class, specifying the type the current class is a contract for.

  The type the current class is a contract for.
- Property
  4.0.0.0
  System.Type The type for which these are the code contract specifications.

  Gets the type that this code contract applies to.