ArcGIS Pro 2.6 API Reference Guide
CreateCubicBezierSegment(MapPoint,Coordinate2D,Coordinate2D,MapPoint,SpatialReference) Method
Example 

ArcGIS.Core.Geometry Namespace > CubicBezierBuilder Class > CreateCubicBezierSegment Method : CreateCubicBezierSegment(MapPoint,Coordinate2D,Coordinate2D,MapPoint,SpatialReference) Method
The start point.
Control point 1 of the cubic bezier.
Control point 2 of the cubic bezier.
The end point.
(Optional) The spatial reference. If spatialReference is null, then the spatial reference is inherited from startPt or endPt.
Convenience method to create a new instance of the CubicBezierSegment class from four control points.
Syntax
Public Overloads Shared Function CreateCubicBezierSegment( _
   ByVal startPt As MapPoint, _
   ByVal controlPt1 As Coordinate2D, _
   ByVal controlPt2 As Coordinate2D, _
   ByVal endPt As MapPoint, _
   Optional ByVal spatialReference As SpatialReference _
) As CubicBezierSegment

Parameters

startPt
The start point.
controlPt1
Control point 1 of the cubic bezier.
controlPt2
Control point 2 of the cubic bezier.
endPt
The end point.
spatialReference
(Optional) The spatial reference. If spatialReference is null, then the spatial reference is inherited from startPt or endPt.
Exceptions
ExceptionDescription
Incompatible spatial references.
startPt or endPt is null.
An operation on an empty geometry was attempted. startPt or controlPt1 or controlPt2 or endPt is empty.
Example
// Use a builder convenience method or a builder constructor.

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

Coordinate2D ctrl1Pt = new Coordinate2D(1.0, 2.0);
Coordinate2D ctrl2Pt = new Coordinate2D(2.0, 1.0);

// Builder convenience methods don't need to run on the MCT
CubicBezierSegment bezier = CubicBezierBuilder.CreateCubicBezierSegment(startPt, ctrl1Pt, ctrl2Pt, endPt, SpatialReferences.WGS84);

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

    CubicBezierSegment anotherBezier = cbb.ToSegment();
  }
});
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

CubicBezierBuilder Class
CubicBezierBuilder Members
Overload List