Udostępnij za pośrednictwem


Collections.Copy(IList, IList) Method

Definition

Copies all of the elements from one list into another.

[Android.Runtime.Register("copy", "(Ljava/util/List;Ljava/util/List;)V", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T" })]
public static void Copy (System.Collections.IList dest, System.Collections.IList src);
[<Android.Runtime.Register("copy", "(Ljava/util/List;Ljava/util/List;)V", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T" })>]
static member Copy : System.Collections.IList * System.Collections.IList -> unit

Parameters

dest
IList

The destination list.

src
IList

The source list.

Attributes

Remarks

Copies all of the elements from one list into another. After the operation, the index of each copied element in the destination list will be identical to its index in the source list. The destination list's size must be greater than or equal to the source list's size. If it is greater, the remaining elements in the destination list are unaffected.

This method runs in linear time.

Java documentation for java.util.Collections.copy(java.util.List<? super T>, java.util.List<? extends T>).

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