## ListImpl::CopyTo method


Copies the entire collection to a compatible one-dimensional [Array](../../../../system/array/), starting at the specified index of the target array.

```cpp
void System::Collections::CollectionBase<T>::ListImpl::CopyTo(const ArrayPtr<T> &array, int32_t index)
```


| Parameter | Type | Description |
| --- | --- | --- |
| array | const ArrayPtr\<T\>\& | The one-dimensional [Array](../../../../system/array/) that is the destination of the elements copied from the collection. The [Array](../../../../system/array/) must have zero-based indexing. |
| index | int32_t | The zero-based index in **array** at which copying begins. |

## See Also

* Typedef [ArrayPtr](../../../../system/arrayptr/)
* Class [ListImpl](../)
* Class [CollectionBase](../../)
* Namespace [System::Collections](../../../)
* Library [Aspose.TeX for C++](../../../../)
