Op Englesch liesen Editéieren

Deelen iwwer


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.

C#
public bool TryCopyTo(Memory<T> destination);

Parameters

destination
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

Produkt Versiounen
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.0 (package-provided), 2.1