Adds a Point to the Polygon by copying the specified Point after any existing points in the specified ring.

Namespace:  ESRI.ArcGISExplorer.Geometry

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: (


public void AddPoint(
	int ringIndex,
	Point pt
Visual Basic (Declaration)
Public Sub AddPoint ( _
	ringIndex As Integer, _
	pt As Point _


Type: System..::.Int32

The index of the ring to add a copy of pt to.
Type: ESRI.ArcGISExplorer.Geometry..::.Point

A Point to copy in to the Polygon.


This overload of the AddPoint method is often used as the simplest way to build up the vertices of a new multipart Polygon, by adding a single Point at a time to the specified ring after any existing points in that ring. The [O:ESRI.ArcGISExplorer.Geometry.Polygon.AddPoints] method may be a useful alternative if multiple points can be added at once. Alternatively if the vertices of a Polygon are known before the Polygon object is instantiated, one or more points can be added in the overloaded Polygon constructors.

The specified ringIndex must already exist in the Polygon; use the [O:ESRI.ArcGISExplorer.Geometry.Polygon.AddRing] method to add a new ring to the Polygon. If only working with single part polygons, an alternative is the AddPoint(Point) overload.

Note that the CoordinateSystem property of any new points added, inserted or set into existing an existing Polygon or Polyline will be discarded, and the coordinates (X and Y properties) of the point assumed to be in the same CoordinateSystem as the Polygon or Polyline to which they are added.


System..::.ArgumentOutOfRangeExceptionThe specified ringIndex must already exist in the Polygon.

See Also