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


IMapControl2.LayerCount Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IM > IMapControl2 Interface > IMapControl2.LayerCount Property
ArcGIS Developer Help

IMapControl2.LayerCount Property

Number of layers in the Map.

[Visual Basic .NET]
Public ReadOnly Property LayerCount As Integer
[C#]
public int LayerCount {get;}
[C++]
HRESULT get_LayerCount(
void
);

Product Availability

Available with ArcGIS Engine.

Description

Returns the number of layers in the Map that implement IDataLayer. This does not include ICompositeLayer objects.

See Also

IMapControl2 Interface | IMapControl4.ClearLayers Method | IMapControl2.ClearLayers Method | IMapControl3.ClearLayers Method | IMapControl4.DeleteLayer Method | IMapControl2.DeleteLayer Method | IMapControl3.DeleteLayer Method | IMapControl4.Layer Property | IMapControl3.Layer Property | IMapControl2.Layer Property | IMapControl2.MoveLayerTo Method | IMapControl4.MoveLayerTo Method | IMapControl3.MoveLayerTo Method