ArcGIS Pro 2.7 API Reference Guide
SetCoords Method (LineBuilder)
Example 

ArcGIS.Core.Geometry Namespace > LineBuilder Class : SetCoords Method
The start point.
The end point.
Sets this line's endpoints to be startPt and endPt. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public void SetCoords( 
   MapPoint startPt,
   MapPoint endPt
)
Public Sub SetCoords( _
   ByVal startPt As MapPoint, _
   ByVal endPt As MapPoint _
) 

Parameters

startPt
The start point.
endPt
The end point.
Exceptions
ExceptionDescription
Incompatible spatial references.
This method or property must be called within the lambda passed to QueuedTask.Run.
startPt or endPt is null.
Remarks
The SetCoords method sets the Start Point and End Point for a line object. If the Start Point and End Point are identical, it creates a zero Length line with the same Start and End point.

Line Segment

Example
// Builder constructors need to run on the MCT.
ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() =>
{
  // use the builder constructor
  using (LineBuilder lb = new LineBuilder(lineSegment))
  {
    // find the existing coordinates
    lb.QueryCoords(out startPt, out endPt);

    // or use 
    //startPt = lb.StartPoint;
    //endPt = lb.EndPoint;

    // update the coordinates
    lb.SetCoords(GeometryEngine.Instance.Move(startPt, 10, 10) as MapPoint, GeometryEngine.Instance.Move(endPt, -10, -10) as MapPoint);

    // or use 
    //lb.StartPoint = GeometryEngine.Instance.Move(startPt, 10, 10) as MapPoint;
    //lb.EndPoint = GeometryEngine.Instance.Move(endPt, -10, -10) as MapPoint;

    LineSegment anotherLineSegment = lb.ToSegment();
  }
});
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

LineBuilder Class
LineBuilder Members