ArcGIS Pro 2.8 API Reference Guide
SegmentType Property (Segment)
Example 

ArcGIS.Core.Geometry Namespace > Segment Class : SegmentType Property
Gets the segment type of this instance.
Syntax
public abstract SegmentType SegmentType {get;}
Public MustOverride ReadOnly Property SegmentType As SegmentType
Example
ReadOnlyPartCollection polylineParts = polyline.Parts;

// enumerate the segments to get the length
double len = 0;
IEnumerator<ReadOnlySegmentCollection> segments = polylineParts.GetEnumerator();
while (segments.MoveNext())
{
  ReadOnlySegmentCollection seg = segments.Current;
  foreach (Segment s in seg)
  {
    len += s.Length;

    // perhaps do something specific per segment type
    switch (s.SegmentType)
    {
      case SegmentType.Line:
        break;
      case SegmentType.Bezier:
        break;
      case SegmentType.EllipticArc:
        break;
    }
  }
}

// or use foreach pattern
foreach (var part in polyline.Parts)
{
  foreach (var segment in part)
  {
    len += segment.Length;

    // perhaps do something specific per segment type
    switch (segment.SegmentType)
    {
      case SegmentType.Line:
        break;
      case SegmentType.Bezier:
        break;
      case SegmentType.EllipticArc:
        break;
    }
  }
}
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

Segment Class
Segment Members