Edit

Share via


ReadOnlySpanExtensions.CopyTo<T> Method

Definition

Copies the contents of a given ReadOnlySpan<T> into destination RefEnumerable<T> instance.

public static void CopyTo<T> (this ReadOnlySpan<T> span, CommunityToolkit.HighPerformance.Enumerables.RefEnumerable<T> destination);
static member CopyTo : ReadOnlySpan<'T> * CommunityToolkit.HighPerformance.Enumerables.RefEnumerable<'T> -> unit
<Extension()>
Public Sub CopyTo(Of T) (span As ReadOnlySpan(Of T), destination As RefEnumerable(Of T))

Type Parameters

T

The type of items in the input ReadOnlySpan<T> instance.

Parameters

span
ReadOnlySpan<T>

The input ReadOnlySpan<T> instance.

destination
RefEnumerable<T>

The RefEnumerable<T> instance to copy items into.

Exceptions

Thrown when the destination RefEnumerable<T> is shorter than the source ReadOnlySpan<T>.

Applies to