ArcGIS Pro 2.7 API Reference Guide
MapPointBuilderEx Constructor(Double,Double,Boolean,Double,Boolean,Double,Boolean,Int32,SpatialReference)
Example 

ArcGIS.Core.Geometry Namespace > MapPointBuilderEx Class > MapPointBuilderEx Constructor : MapPointBuilderEx Constructor(Double,Double,Boolean,Double,Boolean,Double,Boolean,Int32,SpatialReference)
The X-value.
The Y-value.
If true, the z-value is set and HasZ is true.
The z-value which is used only if hasZ is true.
If true, the m-value is set and HasM is true.
The m-value which is used only if hasM is true.
If true, the ID value is set and HasID is true.
The id-value which is used only if hasId is true.
The SpatialReference instance.
Constructs a new MapPoint builder with given x and y coordinates and other optional attributes.
Syntax
public MapPointBuilderEx( 
   double x,
   double y,
   bool hasZ,
   double z,
   bool hasM,
   double m,
   bool hasId,
   int id,
   SpatialReference sr
)
Public Function New( _
   ByVal x As Double, _
   ByVal y As Double, _
   ByVal hasZ As Boolean, _
   ByVal z As Double, _
   ByVal hasM As Boolean, _
   ByVal m As Double, _
   ByVal hasId As Boolean, _
   ByVal id As Integer, _
   Optional ByVal sr As SpatialReference _
)

Parameters

x
The X-value.
y
The Y-value.
hasZ
If true, the z-value is set and HasZ is true.
z
The z-value which is used only if hasZ is true.
hasM
If true, the m-value is set and HasM is true.
m
The m-value which is used only if hasM is true.
hasId
If true, the ID value is set and HasID is true.
id
The id-value which is used only if hasId is true.
sr
The SpatialReference instance.
Example
// Use a builder convenience method or use a builder constructor.

// Builder convenience methods don't need to run on the MCT.
// create a 3d point with M
MapPoint pt = MapPointBuilder.CreateMapPoint(1.0, 2.0, 3.0, 4.0);

MapPoint ptWithM = 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, 4.0))
  {
    // do something with the builder

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

MapPoint clone = ptWithM.Clone() as MapPoint;
MapPoint anotherM = MapPointBuilder.CreateMapPoint(ptWithM);


// builderEx constructors don't need to run on the MCT.
MapPointBuilderEx builderEx = new MapPointBuilderEx(1.0, 2.0, 3.0);
builderEx.HasM = true;
builderEx.M = 4.0;

pt = builderEx.ToGeometry() as MapPoint;


// or another alternative with builderEx constructor
builderEx = new MapPointBuilderEx(1.0, 2.0, true, 3.0, true, 4.0, false, 0);
pt = builderEx.ToGeometry() as MapPoint;
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

MapPointBuilderEx Class
MapPointBuilderEx Members
Overload List