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


IMapLayers.DeleteLayer Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > IM > IMapLayers Interface > IMapLayers.DeleteLayer Method
ArcGIS Developer Help

IMapLayers.DeleteLayer Method

Deletes a layer from the map.

[Visual Basic .NET]
Public Sub DeleteLayer ( _
    ByVal Layer As ILayer _
)
[C#]
public void DeleteLayer (
    ILayer Layer
);
[C++]
HRESULT DeleteLayer(
  ILayer* Layer
);
[C++]
Parameters
Layer [in]

Layer is a parameter of type ILayer*

Product Availability

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

See Also

IMapLayers Interface

.NET Samples

Executing geoprocessing tools in the background