ArrayListGetEnumerator Method (Int32, Int32) |
Returns an enumerator for a range of elements in the
ArrayList.
Namespace: System.CollectionsAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public virtual IEnumerator GetEnumerator(
int index,
int count
)
Parameters
- index
- Type: SystemInt32
The zero-based starting index of the ArrayList section that the enumerator should refer to. - count
- Type: SystemInt32
The number of elements in the ArrayList section that the enumerator should refer to.
Return Value
Type:
IEnumeratorAn
IEnumerator for the specified range of elements in the
ArrayList.
Exceptions Exception | Condition |
---|
ArgumentOutOfRangeException | index is less than zero.-or- count is less than zero. |
ArgumentException | index and count do not specify a valid range in the ArrayList. |
See Also