DataPointCollection Class
Represents a collection of chart series data points.
public sealed class DataPointCollection : IEnumerable<DataPoint>, IEnumerable
Public NotInheritable Class DataPointCollection
Implements IEnumerable(Of DataPoint), IEnumerable
- Inheritance:
- System.ObjectDataPointCollection
Properties
Count
Gets the number of elements contained in the DataPointCollection.
Property Value
- System.Int32
The number of elements contained in the DataPointCollection.
Remarks
Retrieving the value of this property is expensive, so cache it instead of retrieving it multiple times.
Item[Int32]
Gets the data point at the specified index.
public DataPoint this[int index] { get; }
Public ReadOnly Property Item(index As Integer) As DataPoint
Parameters
index
- System.Int32
The zero-based index of the data point to get.
Property Value
The data point at the specified index.
Remarks
If you are iteratively indexing all data points, it is preferable to use the DataPointCollection enumerator in a langword_csharp_foreach statement instead because each indexer call validates the index
by using the Count property whose retrieval is expensive.
Methods
GetEnumerator()
Returns an enumerator that iterates through data points.
public IEnumerator<DataPoint> GetEnumerator()
Public Function GetEnumerator As IEnumerator(Of DataPoint)
Returns
- System.Collections.Generic.IEnumerator<DataPoint>
An System.Collections.Generic.IEnumerator<T> that can be used to iterate through data points.