ArcGIS Pro 2.6 API Reference Guide
GetMMonotonic Method (GeometryEngine)
Example 

ArcGIS.Core.Geometry Namespace > GeometryEngine Class : GetMMonotonic Method
The multipart to check for monotonicity.
Determines whether Ms are monotonic, and if so, whether they are ascending or descending.
Syntax
public Monotonic GetMMonotonic( 
   Multipart multipart
)
Public Function GetMMonotonic( _
   ByVal multipart As Multipart _
) As Monotonic

Parameters

multipart
The multipart to check for monotonicity.

Return Value

Monotonic indicating whether or not the Ms are monotonic as well as whether they are ascending or descending.
Exceptions
ExceptionDescription
Multipart is null or empty.
This geometry is not M-Aware.
Spatial reference of multipartis an image coordinate system.
Remarks
The Ms are ascending if the Ms are ordered such that M1 < M2 < M3 < . . . < Mn. The Ms are descending if the Ms are ordered such that M1 > M2 > M3 > . . . > Mn
Example
string json = "{\"hasM\":true,\"paths\":[[[-3000,-2000,10],[-2000,-2000,15],[-1000,-2000,20]]]}";
Polyline polyline = PolylineBuilder.FromJson(json);

Monotonic monotonic = GeometryEngine.Instance.GetMMonotonic(polyline);
// monotonic = Monotonic.Ascending

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

monotonic = GeometryEngine.Instance.GetMMonotonic(polyline);
// monotonic = Monotonic.Descending

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

monotonic = GeometryEngine.Instance.GetMMonotonic(polyline);
// monotonic = Monotonic.NotMonotonic
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

GeometryEngine Class
GeometryEngine Members