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


IMapTopology2.FindLayer Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (EditorExt)  

IMapTopology2.FindLayer Method

Finds the zero-based index of the specified layer.

[Visual Basic .NET]
Public Function FindLayer ( _
    ByVal Layer As IFeatureLayer _
) As Integer
[C#]
public int FindLayer (
    IFeatureLayer Layer
);

Product Availability

Available with ArcGIS Desktop.

Remarks

FindLayer returns the Layer index position in the MapTopology. This index can then be used in RemoveLayer, which allows removing a specific layer from the MapTopology. This index can also be used in with the get_Layer method that returns a specific layer based on its index in the MapTopology.

If the feature class does not participate in the MapTopology FindLayer returns -1. 

See Also

IMapTopology2 Interface