ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Geometry Namespace / MultipointBuilderEx Class / AddPoint Method / AddPoint(MapPoint) Method
The MapPoint to add. It cannot be null.
Example Version

AddPoint(MapPoint) Method
Add a MapPoint to the list of points.
Syntax
public void AddPoint( 
   MapPoint point
)

Parameters

point
The MapPoint to add. It cannot be null.
Exceptions
ExceptionDescription
The input point is null.
Remarks
The XY-values of the point are added to the end of the Coordinate2Ds list. If the point property HasZ is true, and this builder property HasZ is true, then the Z-value of the point is added to the end of the Zs list. The same is true for Ms and IDs. If the point is missing any of the attributes (Z, M, or ID) that are present in this builder, a default value is used. The default value for Z is zero, M is NaN, and ID is zero. If a point has an attribute that is missing in the builder, the attribute is ignored.
Example
Modify the points of a Multipoint
// assume a multiPoint has been built from 4 points
// the modified multiPoint will have the first point removed and the last point moved

// use the builderEx constructors which don't need to run on the MCT.
MultipointBuilderEx builderEx = new MultipointBuilderEx(multipoint);
// remove the first point
builderEx.RemovePoint(0);
// modify the coordinates of the last point
var ptEx = builderEx.GetPoint(builderEx.PointCount - 1);
builderEx.RemovePoint(builderEx.PointCount - 1);

var newPtEx = MapPointBuilderEx.CreateMapPoint(ptEx.X + 1.0, ptEx.Y + 2.0);
builderEx.AddPoint(newPtEx);
Multipoint modifiedMultiPointEx = builderEx.ToGeometry() as Multipoint;
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also