This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > EditorExt > ESRI.ArcGIS.EditorExt > Interfaces > IM > IMapTopology2 Interface > IMapTopology2.FindLayer Method (ArcObjects .NET 10.4 SDK) |
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 );
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.