InsertRange Method
Inserts the elements of a collection into the System.Collections.ArrayList at the specified index.
Syntax
public override void InsertRange( int index, ICollection c )
public: void InsertRange( int index, ICollection^ c ) override
Parameters
- index
- The zero-based index at which the new elements should be inserted.
- c
- The System.Collections.ICollection whose elements should be inserted into the System.Collections.ArrayList. The collection itself cannot be a null reference (Nothing in Visual Basic), but it can contain elements that are a null reference (Nothing in Visual Basic).
Exceptions
Exception | Description |
---|---|
System.ArgumentNullException | c is a null reference (Nothing in Visual Basic). |
System.ArgumentOutOfRangeException | index is less than zero.-or- index is greater than System.Collections.ArrayList.Count. |
System.NotSupportedException | The System.Collections.ArrayList is read-only.-or- The System.Collections.ArrayList has a fixed size. |
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
See Also