This document is archived and information here might be outdated.  Recommended version.


IRelationshipClass.GetRelationship Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IR > IRelationshipClass Interface > IRelationshipClass.GetRelationship Method
ArcGIS Developer Help

IRelationshipClass.GetRelationship Method

Get the relationship that associates the two specified objects.

[Visual Basic .NET]
Public Function GetRelationship ( _
    ByVal OriginObject As IObject, _
    ByVal DestinationObject As IObject _
) As IRelationship
[C#]
public IRelationship GetRelationship (
    IObject OriginObject,
    IObject DestinationObject
);
[C++]
HRESULT GetRelationship(
  IObject* OriginObject,
  IObject* DestinationObject
);
[C++]
Parameters
OriginObject [in]

OriginObject is a parameter of type IObject* DestinationObject [in]
DestinationObject is a parameter of type IObject*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

When using a relationship class, the GetRelationship method is used for returning a relationship interface to the relationship between the origin object and destination object specified in the function parameters.  This can be used to retrieve the relationship between two objects.

See Also

IRelationshipClass Interface