ArcObjects Library Reference (Carto)  

IMapServerObjects3.LayerID 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_LayerID ( _
    ByVal MapName As String, _
    ByVal pLayer As ILayer _
) As Integer
[C#]
public int get_LayerID (
    string MapName,
    ILayer pLayer
);
[C++]
HRESULT get_LayerID(
  BSTR MapName,
  ILayer* pLayer,
  long* ID
);
[C++]

Parameters

MapName [in]   MapName is a parameter of type BSTR pLayer [in]

  pLayer is a parameter of type ILayer

ID [out, retval]   ID is a parameter of type long

Product Availability

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

See Also

IMapServerObjects3 Interface