Class ReadOnlyRange<T>
Represents a read-only range of elements in a list, supporting custom stepping and indexing.
public class ReadOnlyRange<T> : IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable
Type Parameters
TThe type of elements in the list.
- Inheritance
-
ReadOnlyRange<T>
- Implements
-
IEnumerable<T>
- Inherited Members
- Extension Methods
Properties
Count
Gets the number of elements in the range.
public int Count { get; }
Property Value
this[int]
Gets the element at the specified index within the range.
public T this[int index] { get; }
Parameters
indexintThe index within the range.
Property Value
- T
The element at the specified index.
Methods
GetEnumerator()
Returns an enumerator that iterates through the range.
public IEnumerator<T> GetEnumerator()
Returns
- IEnumerator<T>
An enumerator for the range.