ArcGIS Pro 2.6 API Reference Guide
CreateCubicBezierSegment(IEnumerable<MapPoint>,SpatialReference) Method
Example 

ArcGIS.Core.Geometry Namespace > CubicBezierBuilder Class > CreateCubicBezierSegment Method : CreateCubicBezierSegment(IEnumerable<MapPoint>,SpatialReference) Method
The enumeration of points from which the curve will be constructed.
(Optional) The spatial reference. If spatialReference is null, then the spatial reference is inherited from points.
Convenience method to create a new instance of the CubicBezierSegment class from an enumeration of four control points.
Syntax
Public Overloads Shared Function CreateCubicBezierSegment( _
   ByVal points As IEnumerable(Of MapPoint), _
   Optional ByVal spatialReference As SpatialReference _
) As CubicBezierSegment

Parameters

points
The enumeration of points from which the curve will be constructed.
spatialReference
(Optional) The spatial reference. If spatialReference is null, then the spatial reference is inherited from points.
Exceptions
ExceptionDescription
4 points are required for a cubic bezier.
Incompatible spatial references.
points is null.
An operation on an empty geometry was attempted. points contains an empty point.
Remarks
The four points of the cubic bezier; points[0] is the start point, points[1] and points[2] are the control points, and points[3] is the end point.
Example
// Use a builder convenience method or use a builder constructor.

MapPoint startPt = MapPointBuilder.CreateMapPoint(1.0, 1.0, SpatialReferences.WGS84);
MapPoint endPt = MapPointBuilder.CreateMapPoint(2.0, 2.0, SpatialReferences.WGS84);

MapPoint ctrl1Pt = MapPointBuilder.CreateMapPoint(1.0, 2.0, SpatialReferences.WGS84);
MapPoint ctrl2Pt = MapPointBuilder.CreateMapPoint(2.0, 1.0, SpatialReferences.WGS84);

List<MapPoint> listMapPoints = new List<MapPoint>();
listMapPoints.Add(startPt);
listMapPoints.Add(ctrl1Pt);
listMapPoints.Add(ctrl2Pt);
listMapPoints.Add(endPt);

// Builder convenience methods don't need to run on the MCT
CubicBezierSegment bezier = CubicBezierBuilder.CreateCubicBezierSegment(listMapPoints);

// Builder constructors need to run on the MCT
ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
{
  using (CubicBezierBuilder cbb = new CubicBezierBuilder(listMapPoints))
  {
    // do something with the builder

    bezier = cbb.ToSegment();
  }
});
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

CubicBezierBuilder Class
CubicBezierBuilder Members
Overload List