ArcGIS Pro 2.7 API Reference Guide
CreatePolygon(IEnumerable<IEnumerable<Segment>>,SpatialReference) Method

ArcGIS.Core.Geometry Namespace > PolygonBuilder Class > CreatePolygon Method : CreatePolygon(IEnumerable<IEnumerable<Segment>>,SpatialReference) Method
The polygon rings.
(Optional) The SpatialReference. The default value is null. If spatialReference is null, then the spatial reference will be inherited from parts.
Convenience method to create a new instance of the Polygon class.
Syntax
Public Overloads Shared Function CreatePolygon( _
   ByVal parts As IEnumerable(Of IEnumerable(Of Segment)), _
   Optional ByVal spatialReference As SpatialReference _
) As Polygon

Parameters

parts
The polygon rings.
spatialReference
(Optional) The SpatialReference. The default value is null. If spatialReference is null, then the spatial reference will be inherited from parts.

Return Value

Exceptions
ExceptionDescription
Incompatible spatial references.
parts is null.
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

PolygonBuilder Class
PolygonBuilder Members
Overload List