IContract Interface


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Represents the base interface for all contracts that are used for communication between components that are updated independently.

Namespace:   System.AddIn.Contract
Assembly:  System.AddIn.Contract (in System.AddIn.Contract.dll)

public interface IContract


Specifies that the contract is accessible to a client until the client revokes the contract.


Returns a hash code for the IContract.


Returns a contract that is implemented by this contract.


Indicates whether the specified contract is equal to this IContract.


Returns a string representation of the current IContract.


Specifies that the contract is no longer accessible to a client.

The IContract interface defines a contract that independently updated components, such as an application and an add-in, can use to communicate. Components can use IContract to communicate across process or application domain boundaries, or to communicate with other components in the same process or application domain. IContract serves a similar purpose for components created using the .NET Framework as the IUnknown interface serves for components created using COM. To determine whether an object implements a particular contract, use the QueryContract method.

.NET Framework
Available since 3.5
Return to top