CopyTo()

List::CopyTo(System::ArrayPtr<T>, int) method

Copies list elements into existing array elements.

void System::Collections::Generic::List<T>::CopyTo(System::ArrayPtr<T> array, int arrayIndex) override

Arguments

ParameterTypeDescription
arraySystem::ArrayPtr<T>Destination array.
arrayIndexintDestination array starting index.

List::CopyTo(const System::ArrayPtr<T>&) method

Copies all elements into existing array elements.

void System::Collections::Generic::List<T>::CopyTo(const System::ArrayPtr<T> &array)

Arguments

ParameterTypeDescription
arrayconst System::ArrayPtr<T>&Array to copy elements into.

List::CopyTo(int, const System::ArrayPtr<T>&, int, int) method

Copies elements starting from the specified index into existing array elements.

void System::Collections::Generic::List<T>::CopyTo(int index, const System::ArrayPtr<T> &array, int arrayIndex, int count)

Arguments

ParameterTypeDescription
indexintA 0-based index of the element in the list represented by the current object to start copying from
arrayconst System::ArrayPtr<T>&Array to copy elements into.
arrayIndexintBeginning position in desitnation array.
countintNumber of elements to copy.

See Also