Share via


ArrayList.CopyTo Method (Array, Int32)

Copies the entire ArrayList collection to a compatible one-dimensional array, starting at the specified index number in the destination array.

Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)

Syntax

public virtual void CopyTo (
         Arrayarray,
         intarrayIndex
)

Parameters

  • array
    The one-dimensional array that is the destination of the objects copied from the ArrayList collection. The destination array must have zero-based indexing.
  • arrayIndex
    The zero-based index number in the array parameter where you want the copying to begin.

Remarks

The specified array must be of a type compatible with the objects in the ArrayList collection.

This method calls the Array.Copy method to copy the objects from the ArrayList collection.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, and 4.1.

See Also

Reference

ArrayList Class
ArrayList Members
System.Collections Namespace