Modifica

Condividi tramite


SpanExtensions.CopyTo<T>(Span<T>, RefEnumerable<T>) Method

Definition

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

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

Type Parameters

T

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

Parameters

span
Span<T>

The input Span<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 Span<T>.

Applies to