ESRI.ArcGIS.ADF.IMS
RemoveAt Method
See Also  Example Send Feedback
ESRI.ArcGIS.ADF.IMS.Display.AcetateElement Namespace > AcetateElementCollection Class : RemoveAt Method




index
The zero-based index location of the AcetateElement to be removed.
Removes an AcetateElement from a specific index in a collection.

Syntax

Visual Basic (Declaration) 
Public Sub RemoveAt( _
   ByVal index As Integer _
) 
Visual Basic (Usage)Copy Code
Dim instance As AcetateElementCollection
Dim index As Integer
 
instance.RemoveAt(index)
C# 
public void RemoveAt( 
   int index
)

Parameters

index
The zero-based index location of the AcetateElement to be removed.

Example

This example adds an element to an existing acetate layer, then removes the first element in the collection. Note this will be the element we just added only if it is the only element in the collection.
Visual BasicCopy Code
' Add a previously created element to an existing acetate layer
acetateLayer.AcetateElements.Add(acetatePt)
 
' Add acetate layer to the map
mapView.Layers.Add(acetateLayer)
 
' Remove the first acetate graphic from the layer
acetateLayer.AcetateElements.RemoveAt(0)
C#Copy Code
// Add a previously created element to an existing acetate layer
acetateLayer.AcetateElements.Add(acetatePt)
 
// Add acetate layer to the map
mapView.Layers.Add(acetateLayer)
 
// Remove the first acetate graphic from the layer
acetateLayer.AcetateElements.RemoveAt(0)

Remarks

RemoveAt allows you to remove an element from an acetate layer's collection by the position of the element.

If you remove all elements from an acetate layer's AcetateElementCollection, the acetate layer should be removed from the map as well. Otherwise, a runtime error will be thrown for an empty collection.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2011 All Rights Reserved.