Show / Hide Table of Contents

Constructor LineSegment

LineSegment(MapPoint, MapPoint)

Initializes a new instance of the LineSegment class based on two points.

Declaration
public LineSegment(MapPoint startPoint, MapPoint endPoint)
Parameters
Type Name Description
MapPoint startPoint

The start point.

MapPoint endPoint

The end point.

Remarks

Use this constructor to create a line segment representing a straight line between two points.

If both points have a SpatialReference set, they must be equal.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7

LineSegment(MapPoint, MapPoint, SpatialReference)

Initializes a new instance of the LineSegment class based on two points and a spatial reference.

Declaration
public LineSegment(MapPoint startPoint, MapPoint endPoint, SpatialReference spatialReference)
Parameters
Type Name Description
MapPoint startPoint

The start point.

MapPoint endPoint

The end point.

SpatialReference spatialReference

A spatial reference

Remarks

Use this constructor to create a line segment representing a straight line between two points. The spatialReference parameter is used if the points have a null SpatialReference. If more than one spatial reference is supplied they must all be equal.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7

LineSegment(Double, Double, Double, Double)

Initializes a new instance of the LineSegment class on coordinates

Declaration
public LineSegment(double xStart, double yStart, double xEnd, double yEnd)
Parameters
Type Name Description
System.Double xStart

The X coordinate of start point.

System.Double yStart

The Y coordinate of start point.

System.Double xEnd

The X coordinate of end point.

System.Double yEnd

The Y coordinate of end point.

Remarks

Use this constructor to create a line segment representing a straight line between two points.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7

LineSegment(Double, Double, Double, Double, SpatialReference)

Initializes a new instance of the LineSegment class based on coordinates.

Declaration
public LineSegment(double xStart, double yStart, double xEnd, double yEnd, SpatialReference spatialReference)
Parameters
Type Name Description
System.Double xStart

The X coordinate of start point.

System.Double yStart

The Y coordinate of start point.

System.Double xEnd

The X coordinate of end point.

System.Double yEnd

The Y coordinate of end point.

SpatialReference spatialReference

A spatial reference

Remarks

Use this constructor to create a line segment representing a straight line between two points. The spatialReference parameter is used if the point's have a null SpatialReference. If more than one spatial reference is supplied they must all be equal.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7

LineSegment(Double, Double, Double, Double, Double, Double)

Initializes a new instance of the LineSegment class based on 3D coordinates

Declaration
public LineSegment(double xStart, double yStart, double zStart, double xEnd, double yEnd, double zEnd)
Parameters
Type Name Description
System.Double xStart

The X coordinate of start point.

System.Double yStart

The Y coordinate of start point.

System.Double zStart

The Z coordinate of start point.

System.Double xEnd

The X coordinate of end point.

System.Double yEnd

The Y coordinate of end point.

System.Double zEnd

The Z coordinate of end point.

Remarks

Use this constructor to create a line segment representing a straight line between two points.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7

LineSegment(Double, Double, Double, Double, Double, Double, SpatialReference)

Initializes a new instance of the LineSegment class based on 3D coordinates and a spatial reference.

Declaration
public LineSegment(double xStart, double yStart, double zStart, double xEnd, double yEnd, double zEnd, SpatialReference spatialReference)
Parameters
Type Name Description
System.Double xStart

The X coordinate of start point.

System.Double yStart

The Y coordinate of start point.

System.Double zStart

The Z coordinate of start point.

System.Double xEnd

The X coordinate of end point.

System.Double yEnd

The Y coordinate of end point.

System.Double zEnd

The Z coordinate of end point.

SpatialReference spatialReference

A spatial reference

Remarks

Use this constructor to create a line segment representing a straight line between two points. The spatialReference parameter is used if the point's have a null SpatialReference. If more than one spatial reference is supplied they must all be equal.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7
In This Article
Back to top Copyright © 2022 Esri.