NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ArrayList.InsertRange

Inserts the elements of a collection into the ArrayList at the specified index.

[Visual Basic]
Overridable Public Sub InsertRange( _
   ByVal index As Integer, _
   ByVal c As ICollection _
)
[C#]
public virtual void InsertRange(
   int index,
   ICollection c
);
[C++]
public: virtual void InsertRange(
   int index,
   ICollection* c
);
[JScript]
public function InsertRange(
   index : int,
   c : ICollection
);

Parameters

index
The index at which to insert the new elements.
c
The ICollection whose elements should be inserted into the ArrayList.

Return Value

None.

Exceptions

Exception Type Condition
ArgumentNullException c is a null reference (in Visual Basic Nothing).
ArgumentOutOfRangeException index is less than zero.

-or-

index is greater than Count.

NotSupportedException The ArrayList is read-only.

-or-

The ArrayList has a fixed size.

Remarks

This method can be overridden by a derived class.

If the new Count (the current Count plus the size of the collection) would be greater than Capacity, the capacity of the list is either doubled or increased to the new count, whichever is greater. The internal array is reallocated to accommodate the new elements.

If index is equal to Count, the elements are added to the end of ArrayList.

The order of the elements in the ICollection is preserved in the ArrayList.

See Also

ArrayList Class | ArrayList Members | System.Collections Namespace | Insert | AddRange | SetRange | GetRange | RemoveRange