ArrayList::ToArray Method ()


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

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

virtual array<Object^>^ ToArray()

Return Value

Type: array<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