Language

JavaList.ToArray Method

Definition

Overloads

Name Description
ToArray(Object[])

Copies the list elements to an array in list order.

ToArray()

Copies the list elements to a new array.

ToArray(Object[])

Copies the list elements to an array in list order.

public virtual Java.Lang.Object[] ToArray(Java.Lang.Object[] array);
override this.ToArray : Java.Lang.Object[] -> Java.Lang.Object[]

Parameters

array
Object[]

The array to use if it is large enough.

Returns

Object[]

The supplied array if it is large enough; otherwise, a new array. Elements beyond the copied range in the supplied array are unchanged.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

ToArray()

Copies the list elements to a new array.

public virtual Java.Lang.Object[] ToArray();
override this.ToArray : unit -> Java.Lang.Object[]

Returns

Object[]

An array containing the list elements in list order.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to