ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Core.Geometry Namespace / GeometryEngine Class / Equals Method / Equals(Geometry,Geometry) Method
The base geometry.
The comparison geometry.

In This Topic
    Equals(Geometry,Geometry) Method
    In This Topic
    Returns true if geometry1 and geometry2 occupy the same space.
    Syntax
    Public Overloads Function Equals( _
       ByVal geometry1 As Geometry, _
       ByVal geometry2 As Geometry _
    ) As Boolean

    Parameters

    geometry1
    The base geometry.
    geometry2
    The comparison geometry.

    Return Value

    Returns true if geometry1 occupies the same space as geometry2.
    Exceptions
    ExceptionDescription
    Either geometry1 or geometry2 or both are null.
    The method is not implemented for GeometryBag.
    Incompatible spatial references between the input geometries.
    Remarks
    Returns false if either geometry is null or empty or if the GeometryType of each are not the same.

    If the input geometries are multipatches, then the footprints are compared for equality.

    GeometryEngine Equals

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also