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

ArcGIS.Core.Geometry Namespace > CubicBezierBuilder Class > CreateCubicBezierSegment Method : CreateCubicBezierSegment(MapPoint,MapPoint,MapPoint,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 MapPoint, _
   ByVal controlPt2 As MapPoint, _
   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 controlPt1 or controlPt2 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, 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);

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

// 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 bezier = cbb.ToSegment();
  }
});
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

CubicBezierBuilder Class
CubicBezierBuilder Members
Overload List