Compartir a través de


ArrayList.CopyTo Method (Array)

Copies the entire ArrayList collection to a compatible one-dimensional array, starting at the beginning of the destination array.

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

Syntax

public virtual void CopyTo (
         Array array
)

Parameters

  • array
    The one-dimensional array that is the destination for the objects copied from the ArrayList collection. The destination array must have zero-based indexing.

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.

The objects are copied to the destination array in the same order in which the enumerator iterates through the ArrayList collection.

Version Information

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

See Also

Reference

ArrayList Class
ArrayList Members
System.Collections Namespace