---
title: "System::Buffers::BuffersExtensions::CopyTo method"
url: "https://reference.aspose.com/pdf/cpp/system.buffers/buffersextensions/copyto/"
product: "Aspose.PDF for C++ API Reference"
description: "System::Buffers::BuffersExtensions::CopyTo method. Copies the elements of the given ReadOnlySequence to the destination span in C++."
---

## BuffersExtensions::CopyTo method


Copies the elements of the given [ReadOnlySequence](../../readonlysequence/) to the destination span.

```cpp
template<typename T> static void System::Buffers::BuffersExtensions::CopyTo(const ReadOnlySequence<T> &source, Span<T> destination)
```


| Parameter | Description |
| --- | --- |
| T | The type of elements. |

| Parameter | Type | Description |
| --- | --- | --- |
| source | const ReadOnlySequence\<T\>\& | The sequence whose elements are copied. |
| destination | Span\<T\> | The destination span to fill. |

## See Also

* Class [ReadOnlySequence](../../readonlysequence/)
* Class [Span](../../../system/span/)
* Class [BuffersExtensions](../)
* Namespace [System::Buffers](../../)
* Library [Aspose.PDF for C++](../../../)
