ArcGIS Pro 2.7 API Reference Guide
ToSegment() Method
Example 

ArcGIS.Core.Geometry Namespace > EllipticArcBuilder Class : ToSegment() Method
Returns an EllipticArcSegment instance representing the current state of the builder. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public EllipticArcSegment ToSegment()
Public Function ToSegment() As EllipticArcSegment

Return Value

An EllipticArc segment.
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Example
// Construct a circular arc from (2, 1) to (1, 2) with interior pt (1 + sqrt(2)/2, 1 + sqrt(2)/2).
// Use a builder convenience method or use a builder constructor.

MapPoint fromPt = MapPointBuilder.CreateMapPoint(2, 1);
MapPoint toPt = MapPointBuilder.CreateMapPoint(1, 2);
Coordinate2D interiorPt = new Coordinate2D(1 + Math.Sqrt(2) / 2, 1 + Math.Sqrt(2) / 2);

// Builder convenience methods don't need to run on the MCT.
EllipticArcSegment circularArc = EllipticArcBuilder.CreateEllipticArcSegment(fromPt, toPt, interiorPt);

// Builder constructors need to run on the MCT.
ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
{
  using (EllipticArcBuilder cab = new EllipticArcBuilder(fromPt, toPt, interiorPt))
  {
    // do something with the builder

    EllipticArcSegment anotherCircularArc = cab.ToSegment();
  }
});
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

EllipticArcBuilder Class
EllipticArcBuilder Members