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


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

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


| Parameter | Type | 描述 |
| --- | --- | --- |
| array | const System::ArrayPtr\<T\>\& | [Array](../../../system/array/) 用于将元素复制进去。 |

## 另见

* Typedef [ArrayPtr](../../../system/arrayptr/)
* Class [List](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.Page for C++](../../../)
## List::CopyTo(int, const System::ArrayPtr\<T\>\&, int, int) method


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

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


| Parameter | Type | 描述 |
| --- | --- | --- |
| 索引 | int | 当前对象表示的列表中元素的 0 基索引，用于开始复制。 |
| array | const System::ArrayPtr\<T\>\& | [Array](../../../system/array/) 用于将元素复制进去。 |
| arrayIndex | int | 目标数组的起始位置。 |
| count | int | 要复制的元素数量。 |

## 另见

* Typedef [ArrayPtr](../../../system/arrayptr/)
* Class [List](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.Page for C++](../../../)
## List::CopyTo(System::ArrayPtr\<T\>, int) method


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

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


| Parameter | Type | 描述 |
| --- | --- | --- |
| array | System::ArrayPtr\<T\> | 目标数组。 |
| arrayIndex | int | 目标数组的起始索引。 |

## 另见

* Typedef [ArrayPtr](../../../system/arrayptr/)
* Class [List](../)
* Namespace [System::Collections::Generic](../../)
* Library [Aspose.Page for C++](../../../)
