ArcGIS Pro 2.6 API Reference Guide
IsEqual(MapPoint) Method
Example 

ArcGIS.Core.Geometry Namespace > MapPoint Class > IsEqual Method : IsEqual(MapPoint) Method
A geometry to test for equality.
Compares two MapPoint for equality. This will check the SpatialReference, attribute awareness (HasZ, HasM, HasID), and coordinates for a match.
Syntax
public bool IsEqual( 
   MapPoint other
)
Public Overloads Function IsEqual( _
   ByVal other As MapPoint _
) As Boolean

Parameters

other
A geometry to test for equality.

Return Value

True if the two geometries are equal.
Example
MapPoint pt1 = MapPointBuilder.CreateMapPoint(1, 2, 3, 4, 5);
int ID = pt1.ID;           // ID = 5
bool hasID = pt1.HasID;     // hasID = true

MapPoint pt2 = MapPointBuilder.CreateMapPoint(1, 2, 3, 4, 0);
ID = pt2.ID;        // ID = 0
hasID = pt2.HasID;  // hasID = true

MapPoint pt3 = MapPointBuilder.CreateMapPoint(1, 2, 3, 4);
ID = pt3.ID;          // ID = 0
hasID = pt3.HasID;    // hasID = false

MapPoint pt4 = MapPointBuilder.CreateMapPoint(1, 2, 3, 44);
ID = pt4.ID;          // ID = 0
hasID = pt4.HasID;    // hasID = false
bool hasM = pt4.HasM; // hasM = true

MapPoint pt5 = MapPointBuilder.CreateMapPoint(1, 2, 3);
ID = pt5.ID;          // ID = 0
hasID = pt5.HasID;    // hasID = false
hasM = pt5.HasM;      // hasM = false

bool isEqual = pt1.IsEqual(pt2);   // isEqual = false, different IDs
isEqual = pt2.IsEqual(pt3);        // isEqual = false, HasId is different
isEqual = pt4.IsEqual(pt3);        // isEqual = false, different Ms
isEqual = pt1.IsEqual(pt5);        // isEqual = false, pt has M, id but pt5 does not.  
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

MapPoint Class
MapPoint Members
Overload List