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


IMapTopology.RemoveClass Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > EditorExt > ESRI.ArcGIS.EditorExt > Interfaces > IM > IMapTopology Interface > IMapTopology.RemoveClass Method
ArcGIS Developer Help

IMapTopology.RemoveClass Method

Removes a feature class from this map topology. All existing topology elements will become invalid.

[Visual Basic .NET]
Public Sub RemoveClass ( _
    ByVal index As Integer _
)
[C#]
public void RemoveClass (
    int index
);

Product Availability

Available with ArcGIS Desktop.

Remarks

This method has been depreciated in favor of IMapTopology2.RemoveLayer

[C#]
public void AddRemoveMapTopologyClass()
{
  UID extUid = new UIDClass();
  extUid.Value = "esriEditorExt.TopologyExtension";
  //You can get app from ICommand :: OnCreate() hook parameter
  ITopologyExtension topologyExt = app.FindExtensionByCLSID(extUid) as ITopologyExtension;
  IMapTopology mapTopology = topologyExt.MapTopology;
  mapTopology.AddClass(fc0);
  mapTopology.RemoveClass(0);
}
[Visual Basic .NET]
  Public Sub AddRemoveMapTopologyClass()
    'You can get app from ICommand :: OnCreate() hook parameter
    Dim extUid As UID = New UIDClass()
    extUid.Value = "esriEditorExt.TopologyExtension"
    Dim topologyExt As ITopologyExtension = TryCast(app.FindExtensionByCLSID(extUid), ITopologyExtension)
    Dim mapTopology As IMapTopology = topologyExt.MapTopology
    mapTopology.AddClass(fc0)
    mapTopology.RemoveClass(0)
  End Sub

See Also

IMapTopology Interface