ContractClassAttribute Constructor (Type^)

 

Initializes a new instance of the ContractClassAttribute class.

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

public:
ContractClassAttribute(
	Type^ typeContainingContracts
)

Parameters

typeContainingContracts
Type: System::Type^

The type that contains the code contracts for this type.

The following example shows how to use the ContractClassAttribute constructor to specify that the contracts for the IArray interface are contained in the IArrayContracts class.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 4.0
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1
Return to top
Show: