Returns an enumerator for a section of the ArrayList.
[Visual Basic] Overloads Overridable Public Function GetEnumerator( _ ByVal index As Integer, _ ByVal count As Integer _ ) As IEnumerator [C#] public virtual IEnumerator GetEnumerator( int index, int count ); [C++] public: virtual IEnumerator* GetEnumerator( int index, int count ); [JScript] public function GetEnumerator( index : int, count : int ) : IEnumerator;
An IEnumerator for the specified section of the ArrayList.
Exception Type | 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. |
This method can be overridden by a derived class.
The enumerator does not have exclusive access to the ArrayList; therefore, any changes made to the list may cause Current or MoveNext to throw an exception.
ArrayList Class | ArrayList Members | System.Collections Namespace | ArrayList.GetEnumerator Overload List