ArcGIS Pro 2.6 API Reference Guide
CreatePolygon(IEnumerable<Coordinate3D>,SpatialReference) Method
Example 

ArcGIS.Core.Geometry Namespace > PolygonBuilder Class > CreatePolygon Method : CreatePolygon(IEnumerable<Coordinate3D>,SpatialReference) Method
Coordinates to create the polygon.
(Optional) The SpatialReference. The default value is null.
Convenience method to create a new instance of the Polygon class.
Syntax
Public Overloads Shared Function CreatePolygon( _
   ByVal coordinates As IEnumerable(Of Coordinate3D), _
   Optional ByVal spatialReference As SpatialReference _
) As Polygon

Parameters

coordinates
Coordinates to create the polygon.
spatialReference
(Optional) The SpatialReference. The default value is null.

Return Value

Exceptions
ExceptionDescription
coordinates is null.
Example
// methods need to run on the MCT
ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
{
  List<MapPoint> list3D = new List<MapPoint>();
  list3D.Add(MapPointBuilder.CreateMapPoint(1.0, 1.0, 1.0, 2.0));
  list3D.Add(MapPointBuilder.CreateMapPoint(1.0, 2.0, 1.0, 2.0));
  list3D.Add(MapPointBuilder.CreateMapPoint(2.0, 2.0, 1.0, 2.0));
  list3D.Add(MapPointBuilder.CreateMapPoint(2.0, 1.0, 1.0, 2.0));

  var polygon = PolygonBuilder.CreatePolygon(list3D);
});

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

PolygonBuilder Class
PolygonBuilder Members
Overload List