ToArray Method
Collapse the table of content
Expand the table of content

ArrayList.ToArray Method ()


Copies the elements of the ArrayList to a new Object array.

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

Public Overridable Function ToArray As Object()

Return Value

Type: System.Object()

An Object array containing copies of the elements of the ArrayList.

The elements are copied using Array.Copy, which is an O(n) operation, where n is Count.

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Return to top
© 2015 Microsoft