System::Buffers::BuffersExtensions::ToArray method

BuffersExtensions::ToArray method

Copies the elements of the given ReadOnlySequence to a newly allocated array.

template<typename T> static SharedPtr<Array<T>> System::Buffers::BuffersExtensions::ToArray(const ReadOnlySequence<T> &sequence)
ParameterDescription
TThe type of elements.
ParameterTypeDescription
sequenceconst ReadOnlySequence<T>&The sequence whose elements are copied.

ReturnValue

A new array containing a copy of the elements in the sequence.

See Also