Copies the elements of a collection over a range of elements in the ArrayList.
[Visual Basic] Overridable Public Sub SetRange( _ ByVal index As Integer, _ ByVal c As ICollection _ ) [C#] public virtual void SetRange( int index, ICollection c ); [C++] public: virtual void SetRange( int index, ICollection* c ); [JScript] public function SetRange( index : int, c : ICollection );
None.
Exception Type | Condition |
---|---|
ArgumentOutOfRangeException | index is less than zero.
-or- index plus the number of elements in c is greater than the Capacity of the ArrayList. |
ArgumentNullException | c is a null reference (in Visual Basic Nothing). |
NotSupportedException | The ArrayList is read-only. |
This method can be overridden by a derived class.
ArrayList Class | ArrayList Members | System.Collections Namespace | AddRange | InsertRange | GetRange | RemoveRange