ToArray()

BuffersExtensions::ToArray(const ReadOnlySequence<T>&) 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)

Template parameters

ParameterDescription
TThe type of elements.

Arguments

ParameterTypeDescription
sequenceconst ReadOnlySequence<T>&The sequence whose elements are copied.

Return Value

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

See Also