Modifica

Condividi tramite


ReadOnlySpanExtensions.TryCopyTo<T> Method

Definition

Attempts to copy the contents of a given ReadOnlySpan<T> into destination RefEnumerable<T> instance.

public static bool TryCopyTo<T> (this ReadOnlySpan<T> span, CommunityToolkit.HighPerformance.Enumerables.RefEnumerable<T> destination);
static member TryCopyTo : ReadOnlySpan<'T> * CommunityToolkit.HighPerformance.Enumerables.RefEnumerable<'T> -> bool
<Extension()>
Public Function TryCopyTo(Of T) (span As ReadOnlySpan(Of T), destination As RefEnumerable(Of T)) As Boolean

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.

Returns

Whether or not the operation was successful.

Applies to