Export (0) Print
Expand All

ArrayList.ToArray Method

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

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

public virtual Object[] ToArray()

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.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

XNA Framework

Supported in: 3.0, 2.0, 1.0
Show:
© 2015 Microsoft