ArraySegment<T>.ToArray Method

Definition

Copies the contents of this array segment into a new array.

public T[] ToArray ();

Returns

T[]

An array containing the data in the current array segment.

Exceptions

default(ArraySegment<T>) cannot be converted to an array.

Applies to

Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Standard 2.1