ArcGIS Pro 2.9 API Reference Guide
GetExteriorRings Method
Example 

ArcGIS.Core.Geometry Namespace > Polygon Class : GetExteriorRings Method
(Optional) Determines if the spatial reference should be set in each of the returned polygons. If setSpatialReference is set to true, then the spatial reference in each polygon is inherited from this polygon. If setSpatialReference is set to false, then the spatial reference in each polygon is set to null. The default value is true.
Gets all of the exterior rings in this polygon.
Syntax
public IList<Polygon> GetExteriorRings( 
   bool setSpatialReference
)
Public Function GetExteriorRings( _
   Optional ByVal setSpatialReference As Boolean _
) As IList(Of Polygon)

Parameters

setSpatialReference
(Optional) Determines if the spatial reference should be set in each of the returned polygons. If setSpatialReference is set to true, then the spatial reference in each polygon is inherited from this polygon. If setSpatialReference is set to false, then the spatial reference in each polygon is set to null. The default value is true.

Return Value

A list of polygons representing the exterior rings in this polygon.
Remarks
An exterior ring is a part that is oriented clockwise.
Example
public void GetExteriorRings(Polygon inputPolygon)
{
  if (inputPolygon == null || inputPolygon.IsEmpty)
    return;

  // polygon part count
  int partCount = inputPolygon.PartCount;
  // polygon exterior ring count
  int numExtRings = inputPolygon.ExteriorRingCount;
  // get set of exterior rings for the polygon
  IList<Polygon> extRings = inputPolygon.GetExteriorRings();

  // test each part for "exterior ring"
  for (int idx = 0; idx < partCount; idx++)
  {
    bool isExteriorRing = inputPolygon.IsExteriorRing(idx);
  }
}
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

Polygon Class
Polygon Members