ArcGIS Pro 2.7 API Reference Guide
GetMinMaxM Method (IGeometryEngine)
Example 

ArcGIS.Core.Geometry Namespace > IGeometryEngine Interface : GetMinMaxM Method
The multipart from which the M values are extracted.
The minimum M value.
The maximum M value.
Gets the minimum and maximum M value.
Syntax
void GetMinMaxM( 
   Multipart multipart,
   out double minM,
   out double maxM
)
Sub GetMinMaxM( _
   ByVal multipart As Multipart, _
   ByRef minM As Double, _
   ByRef maxM As Double _
) 

Parameters

multipart
The multipart from which the M values are extracted.
minM
The minimum M value.
maxM
The maximum M value.
Exceptions
ExceptionDescription
Multipart is null or empty.
This geometry is not M-Aware.
Spatial reference of multipartis an image coordinate system.
Example
string json = "{\"hasM\":true,\"rings\":[[[-3000,-2000,10],[-2000,-2000,15],[-1000,-2000,20],[0,-2000,0],[1000,-2000,-20],[2000,-2000,-30],[3000,-2000,10],[4000,-2000,5]]],\"spatialReference\":{\"wkid\":3857}}";
Polygon polygon = PolygonBuilder.FromJson(json);

double minM, maxM;
GeometryEngine.Instance.GetMinMaxM(polygon, out minM, out maxM);
// minM = -30 
// maxM = 20

json = "{\"hasM\":true,\"paths\":[[[-3000,-2000,10],[-2000,-2000,null],[-1000,-2000,null]]]}";
Polyline polyline = PolylineBuilder.FromJson(json);

GeometryEngine.Instance.GetMinMaxM(polyline, out minM, out maxM);
// minM = 10
// maxM = 10

json = "{\"hasM\":true,\"paths\":[[[-3000,-2000,null],[-2000,-2000,null],[-1000,-2000,null]]]}";
polyline = PolylineBuilder.FromJson(json);

GeometryEngine.Instance.GetMinMaxM(polyline, out minM, out maxM);
// minM = double.Nan
// maxM = double.Nan
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

IGeometryEngine Interface
IGeometryEngine Members