Copies a range of elements in the ArrayList into a new ArrayList.
[Visual Basic] Overridable Public Function GetRange( _ ByVal index As Integer, _ ByVal count As Integer _ ) As ArrayList [C#] public virtual ArrayList GetRange( int index, int count ); [C++] public: virtual ArrayList* GetRange( int index, int count ); [JScript] public function GetRange( index : int, count : int ) : ArrayList;
A new ArrayList with copies of the specified range of elements from the source ArrayList.
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | index is less than zero.
-or- count is less than zero. |
ArgumentException | index and count do not denote a valid range of elements in the ArrayList. |
This method can be overridden by a derived class.
ArrayList Class | ArrayList Members | System.Collections Namespace | RemoveRange | AddRange | InsertRange | SetRange