System::Collections::Generic::List::CopyTo method

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)
ParameterTypeDescription
arrayconst System::ArrayPtr<T>&Array to copy elements into.

See Also

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)
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

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
ParameterTypeDescription
arraySystem::ArrayPtr<T>Destination array.
arrayIndexintDestination array starting index.

See Also