ArrayList.SetRange Method (Int32, ICollection)
.NET Framework (current version)
Copies the elements of a collection over a range of elements in the ArrayList.
Assembly: mscorlib (in mscorlib.dll)
abstract SetRange : index:int * c:ICollection -> unit override SetRange : index:int * c:ICollection -> unit
Parameters
- index
-
Type:
System.Int32
The zero-based ArrayList index at which to start copying the elements of c.
- c
-
Type:
System.Collections.ICollection
The ICollection whose elements to copy to the ArrayList. The collection itself cannot be null, but it can contain elements that are null.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | |
| ArgumentNullException | c is null. |
| NotSupportedException | The ArrayList is read-only. |
ArrayList accepts null as a valid value and allows duplicate elements.
The order of the elements in the ICollection is preserved in the ArrayList.
This method is an O(n + 1) operation, where n is Count.
Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Available since 10
.NET Framework
Available since 1.1
Show: