Compartir a través de


ArrayList.ToArray Method ()

Copies objects from the ArrayList collection to a new Object array.

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

Syntax

public virtual Object [] ToArray ()

Return Value

An Object array containing objects copied from the ArrayList collection.

Remarks

You copy the objects by using the Array.Copy method, which is an O(n) operation, where n is the value of the Count property.

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