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

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

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

void System::Collections::Generic::List<T>::CopyTo(const System::ArrayPtr<T> &array)
ParameterType描述
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)
ParameterType描述
索引int当前对象表示的列表中元素的 0 基索引,用于开始复制。
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
ParameterType描述
arraySystem::ArrayPtr<T>目标数组。
arrayIndexint目标数组的起始索引。

另见