Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ArrayList::ToArray Method ()

 

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

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

public:
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
Show:
© 2017 Microsoft