Adds a copy of the specified enumerable set of Points to the end of the set of existing Points
in the Multipoint.
Namespace:
ESRI.ArcGISExplorer.GeometryAssembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
C# |
---|
public void AddPoints( IEnumerable<Point> points ) |
Visual Basic (Declaration) |
---|
Public Sub AddPoints ( _ points As IEnumerable(Of Point) _ ) |
Parameters
- points
- Type: System.Collections.Generic..::.IEnumerable<(Of <(Point>)>)
A generic enumerable set of Point objects to be copied in to the Multipoint.
Examples
The code below defines a new Multipoint from the vertices of an existing Polygon, by using the AddPoints method.
The code assumes that there is an existing single part Polygon object named poly.
Instances of the Point class are fully-qualified to avoid namespace clashes with System.Drawing.Point.
CopyC#
// Create a new Multipoint using the CoordinateSystem of the existing Polygon. Multipoint mpt = new Multipoint(poly.CoordinateSystem); // Add the vertices of the Polygon (using the first part if a multipart Polygon) to the Multipoint. // Points are retrieved and set by value, therefore the mpt and poly have separate collections of Point objects. mpt.AddPoints(poly.GetRing(0));
CopyVB.NET
' Create a new Multipoint using the CoordinateSystem of the existing Polygon. Dim mpt As Multipoint = New Multipoint(poly.CoordinateSystem) ' Add the vertices of the Polygon (using the first part if a multipart Polygon) to the Multipoint. ' Points are retrieved and set by value, therefore the mpt and poly have separate collections of Point objects. mpt.AddPoints(poly.GetRing(0))