public void GetAllSegments( ref ICollection<Segment> segments )
Public Sub GetAllSegments( _ ByRef segments As ICollection(Of Segment) _ )
Parameters
- segments
- The collection of segments. If segments is null, a list will be allocated.
public void GetAllSegments( ref ICollection<Segment> segments )
Public Sub GetAllSegments( _ ByRef segments As ICollection(Of Segment) _ )
ICollection<Segment> collection = new List<Segment>(); polyline.GetAllSegments(ref collection); int numSegments = collection.Count; // = 10 IList<Segment> iList = collection as IList<Segment>; for (int i = 0; i < numSegments; i++) { // do something with iList[i] } // use the segments to build another polyline Polyline polylineFromSegments = PolylineBuilderEx.CreatePolyline(collection);
List<Segment> segmentList = new List<Segment>(30); ICollection<Segment> collection = segmentList; polygon.GetAllSegments(ref collection); // segmentList.Count = 4 // segmentList.Capacity = 30 // use the segments to build another polygon Polygon polygonFromSegments = PolygonBuilderEx.CreatePolygon(collection);
Target Platforms: Windows 11, Windows 10