Copies the elements from the current instance to the specified Array , starting at the specified index of the array.
- array
- The one-dimensional Array that is the destination of the elements copied from the current instance. The Array.Length of this array is greater than or equal to the sum of arrayIndex and the ArrayList.Count of the current instance.
- arrayIndex
- A int that specifies the first index of array to which the elements of the current instance are copied. This value is greater than or equal to zero, and less than array.Length.
Type Reason ArgumentNullException array is null. ArgumentOutOfRangeException arrayIndex < 0. ArgumentException array has more than one dimension.
-or-
arrayIndex >= array.Length.
-or-
arrayIndex + ArrayList.Count of the current instance > array.Length.
InvalidCastException At least one element in the current instance is not assignment-compatible with the type of array.
Note: This method is implemented to support the IList interface.Operation
As described above.This method uses Array.Copy(Array, Array, int) to copy the current instance to array.
Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0