PdfLineSegmentCollection Class
Represents a collection of PdfLineSegments.
public sealed class PdfLineSegmentCollection : IList<PdfLineSegment>, ICollection<PdfLineSegment>, IEnumerable<PdfLineSegment>, IEnumerablePublic NotInheritable Class PdfLineSegmentCollection
Implements IList(Of PdfLineSegment), ICollection(Of PdfLineSegment), IEnumerable(Of PdfLineSegment), IEnumerable- Inheritance:
- System.ObjectPdfLineSegmentCollection
Implements
Properties
Count
Gets the number of PdfLineSegments contained in the PdfLineSegmentCollection.
Property Value
- System.Int32
The number of PdfLineSegments contained in the PdfLineSegmentCollection.
Item[Int32]
Gets or sets the PdfLineSegment at the specified index.
public PdfLineSegment this[int index] { get; set; }Public Property Item(index As Integer) As PdfLineSegmentParameters
index- System.Int32
The zero-based index of the PdfLineSegment to get or set.
Property Value
The PdfLineSegment at the specified index.
Exceptions
- System.ArgumentOutOfRangeException
index is less than 0 or index is equal to or greater than Count.
Methods
Add(PdfLineSegment)
Adds a PdfLineSegment to the end of the PdfLineSegmentCollection.
Parameters
lineSegment- PdfLineSegment
The PdfLineSegment to be added to the end of the PdfLineSegmentCollection.
Clear()
Removes all PdfLineSegments from the PdfLineSegmentCollection.
Contains(PdfLineSegment)
Determines whether a PdfLineSegment is in the PdfLineSegmentCollection.
public bool Contains(PdfLineSegment lineSegment)Public Function Contains(lineSegment As PdfLineSegment) As BooleanParameters
lineSegment- PdfLineSegment
The PdfLineSegment to locate in the PdfLineSegmentCollection.
Returns
- System.Boolean
true if lineSegment is found in the PdfLineSegmentCollection; otherwise, false.
CopyTo(PdfLineSegment[], Int32)
Copies the entire PdfLineSegmentCollection to a compatible one-dimensional array, starting at the specified index of the target array.
public void CopyTo(PdfLineSegment[] array, int arrayIndex)Public Sub CopyTo(array As PdfLineSegment(), arrayIndex As Integer)Parameters
array- PdfLineSegment[]
The one-dimensional System.Array that is the destination of the PdfLineSegments copied from PdfLineSegmentCollection. The System.Array must have zero-based indexing.
arrayIndex- System.Int32
The zero-based index in array at which copying begins.
Exceptions
- System.ArgumentNullException
array is null.
- System.ArgumentOutOfRangeException
arrayIndex is less than 0 or greater than array's System.Array.Length.
- System.ArgumentException
The number of PdfLineSegments in the source PdfLineSegmentCollection is greater than the available space from arrayIndex to the end of the destination array.
GetEnumerator()
Returns an enumerator that iterates through the PdfLineSegmentCollection.
public IEnumerator<PdfLineSegment> GetEnumerator()Public Function GetEnumerator As IEnumerator(Of PdfLineSegment)Returns
- System.Collections.Generic.IEnumerator<PdfLineSegment>
An System.Collections.Generic.IEnumerator<T> for the PdfLineSegmentCollection.
IndexOf(PdfLineSegment)
Searches for the specified PdfLineSegment and returns the zero-based index of the first occurrence within the entire PdfLineSegmentCollection.
public int IndexOf(PdfLineSegment lineSegment)Public Function IndexOf(lineSegment As PdfLineSegment) As IntegerParameters
lineSegment- PdfLineSegment
The PdfLineSegment to locate in the PdfLineSegmentCollection.
Returns
- System.Int32
The zero-based index of the first occurrence of lineSegment within the entire PdfLineSegmentCollection, if found; otherwise, –1.
Insert(Int32, PdfLineSegment)
Inserts a PdfLineSegment into the PdfLineSegmentCollection at the specified index.
public void Insert(int index, PdfLineSegment lineSegment)Public Sub Insert(index As Integer, lineSegment As PdfLineSegment)Parameters
index- System.Int32
The zero-based index at which lineSegment should be inserted.
lineSegment- PdfLineSegment
The PdfLineSegment to insert.
Exceptions
- System.ArgumentOutOfRangeException
index is less than 0 or index is greater than Count.
Remove(PdfLineSegment)
Removes the first occurrence of a specific PdfLineSegment from the PdfLineSegmentCollection.
public bool Remove(PdfLineSegment lineSegment)Public Function Remove(lineSegment As PdfLineSegment) As BooleanParameters
lineSegment- PdfLineSegment
The PdfLineSegment to remove from the PdfLineSegmentCollection.
Returns
- System.Boolean
true if lineSegment is successfully removed; otherwise, false. This method also returns false if lineSegment was not found in the PdfLineSegmentCollection.
RemoveAt(Int32)
Removes the PdfLineSegment at the specified index of the PdfLineSegmentCollection.
Parameters
index- System.Int32
The zero-based index of the PdfLineSegment to remove.
Exceptions
- System.ArgumentOutOfRangeException
index is less than 0 or index is equal to or greater than Count.