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


IRelationshipClass.DeleteRelationship 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.DeleteRelationship Method
ArcGIS Developer Help

IRelationshipClass.DeleteRelationship Method

Deletes the relationship that associates the two specified objects.

[Visual Basic .NET]
Public Sub DeleteRelationship ( _
    ByVal OriginObject As IObject, _
    ByVal DestinationObject As IObject _
)
[C#]
public void DeleteRelationship (
    IObject OriginObject,
    IObject DestinationObject
);
[C++]
HRESULT DeleteRelationship(
  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

The DeleteRelationship method deletes the relationship between the origin object and destination object specified in the parameters.  This will remove the entry for this relationship from the relationship class.

This method should be called within an edit session.

See Also

IRelationshipClass Interface