Class ListIndexBasedEnumerable<T>
- Namespace
- Hi.Common.Collections
- Assembly
- HiGeom.dll
Provides an enumerable wrapper for a list that iterates over a specified range of indices.
public class ListIndexBasedEnumerable<T> : IEnumerable<T>, IEnumerable
Type Parameters
T
The type of elements in the list.
- Inheritance
-
ListIndexBasedEnumerable<T>
- Implements
-
IEnumerable<T>
- Inherited Members
- Extension Methods
Constructors
ListIndexBasedEnumerable(IList<T>, int, int)
Initializes a new instance of the ListIndexBasedEnumerable<T> class.
public ListIndexBasedEnumerable(IList<T> source, int begin, int end)
Parameters
source
IList<T>The source list to enumerate.
begin
intThe starting index (inclusive).
end
intThe ending index (inclusive).
Properties
Begin
Gets or sets the beginning index (inclusive) for enumeration.
public int Begin { get; set; }
Property Value
End
Gets or sets the ending index (inclusive) for enumeration.
public int End { get; set; }
Property Value
Source
Gets or sets the source list.
public IList<T> Source { get; set; }
Property Value
- IList<T>
Methods
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<T> GetEnumerator()
Returns
- IEnumerator<T>
An enumerator that can be used to iterate through the collection.