ReadOnlyMemory<T>.TryCopyTo(Memory<T>) ReadOnlyMemory<T>.TryCopyTo(Memory<T>) ReadOnlyMemory<T>.TryCopyTo(Memory<T>) ReadOnlyMemory<T>.TryCopyTo(Memory<T>) Method

Definition

Tries to copy the contents of the readonly-only memory into the destination and returns a value that indicates whether the copy operation succeeded.

public:
 bool TryCopyTo(Memory<T> destination);
public bool TryCopyTo (Memory<T> destination);
member this.TryCopyTo : Memory<'T> -> bool
Public Function TryCopyTo (destination As Memory(Of T)) As Boolean

Parameters

destination
Memory<T> Memory<T> Memory<T> Memory<T>

The memory region to copy items into.

Returns

true if the copy operation succeeded. false if destination is smaller than the current instance, and no data is written to destination.

Remarks

If the source and destination overlap, this method behaves as if the original values are in a temporary location before the destination is overwritten.

Applies to