System::Collections::Generic::List::CopyTo 方法

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

将所有元素复制到现有数组元素中。

void System::Collections::Generic::List<T>::CopyTo(const System::ArrayPtr<T> &array)
参数类型描述
arrayconst System::ArrayPtr<T>&要复制元素的 Array

另见

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

从指定索引开始,将元素复制到现有数组元素中。

void System::Collections::Generic::List<T>::CopyTo(int index, const System::ArrayPtr<T> &array, int arrayIndex, int count)
参数类型描述
索引int当前对象表示的列表中要开始复制的元素的零基索引
arrayconst System::ArrayPtr<T>&要复制元素的 Array
arrayIndexint目标数组中的起始位置。
countint要复制的元素数量。

另见

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

将列表元素复制到现有数组元素中。

void System::Collections::Generic::List<T>::CopyTo(System::ArrayPtr<T> array, int arrayIndex) override
参数类型描述
数组System::ArrayPtr<T>目标数组。
arrayIndexint目标数组的起始索引。

另见