This documentation is archived and is not being maintained.

ArrayList.ToArray Method

Copies the elements of the ArrayList to a new array.

Overload List

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

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public Overridable Function ToArray() As Object()
[C#] public virtual object[] ToArray();
[C++] public: virtual Object* ToArray() __gc[];
[JScript] public function ToArray() : Object[];

Copies the elements of the ArrayList to a new array of the specified type.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public Overridable Function ToArray(Type) As Array
[C#] public virtual Array ToArray(Type);
[C++] public: virtual Array* ToArray(Type*);
[JScript] public function ToArray(Type) : Array;

See Also

ArrayList Class | ArrayList Members | System.Collections Namespace

Show: