ArcGIS Pro 2.6 API Reference Guide
MapPointBuilder Constructor(MapPoint)
Example 

ArcGIS.Core.Geometry Namespace > MapPointBuilder Class > MapPointBuilder Constructor : MapPointBuilder Constructor(MapPoint)
Specifies the coordinates and spatial reference for this instance.
Initializes a new instance of the MapPointBuilder class. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public MapPointBuilder( 
   MapPoint mapPoint
)
Public Function New( _
   ByVal mapPoint As MapPoint _
)

Parameters

mapPoint
Specifies the coordinates and spatial reference for this instance.
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
mapPoint is null.
Remarks
The resulting MapPointBuilder will inherit the input MapPoint attribute properties. For example, if mapPoint.HasM = true, then the MapPointBuilder HasM property will also be true, and the m-value of the MapPointBuilder will equal mapPoint.M.
Example
// Use a builder convenience method or use a builder constructor.

MapPoint point1 = null;

// Builder constructors need to run on the MCT.
ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
{
  using (MapPointBuilder mb = new MapPointBuilder(1.0, 2.0, 3.0))
  {
    bool bhasZ = mb.HasZ;          // hasZ = true
    bool bhasM = mb.HasM;          // hasM = false
    bool bhasID = mb.HasID;        // hasID = false

    // do something with the builder

    point1 = mb.ToGeometry();
  }
});

double x = point1.X;                  // x = 1.0
double y = point1.Y;                  // y = 2.0
double z = point1.Z;                  // z = 3.0
double m = point1.M;                  // m = Nan
int ID = point1.ID;                   // ID = 0
bool hasZ = point1.HasZ;              // hasZ = true
bool hasM = point1.HasM;              // hasM = false
bool hasID = point1.HasID;            // hasID = false
bool isEmpty = point1.IsEmpty;        // isEmpty = false

// Builder convenience methods don't need to run on the MCT.
MapPoint point2 = MapPointBuilder.CreateMapPoint(point1);
x = point2.X;                   // x = 1.0
y = point2.Y;                   // y = 2.0
z = point2.Z;                   // z = 3.0
m = point2.M;                   // m = Nan
hasZ = point2.HasZ;           // hasZ = true
hasM = point2.HasM;           // hasM = false
hasID = point2.HasID;         // hasID = false
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

MapPointBuilder Class
MapPointBuilder Members
Overload List