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


IMapServerObjects2.Layer Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IM > IMapServerObjects2 Interface > IMapServerObjects2.Layer Property
ArcGIS Developer Help

IMapServerObjects2.Layer Property

The layer specified by the map name and layer ID. If the mapName is blank, the default map (active data frame) will be assumed.

[Visual Basic .NET]
Public Function get_Layer ( _
    ByVal MapName As String, _
    ByVal LayerID As Integer _
) As ILayer
[C#]
public ILayer get_Layer (
    string MapName,
    int LayerID
);
[C++]
HRESULT get_Layer(
  BSTR MapName,
  long LayerID,
  ILayer** layerObject
);
[C++]
Parameters
MapName [in]

MapName is a parameter of type BSTR LayerID [in]
LayerID is a parameter of type long layerObject [out, retval]
layerObject is a parameter of type ILayer**

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

Use Layer to access the members of ILayer.

See Also

IMapServerObjects2 Interface