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

定义

将此内存的内容复制到目标 Memory<T> 实例。Copies the contents of the memory into a destination Memory<T> instance.

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

参数

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

目标 Memory<T> 对象。The destination Memory<T> object.

返回

如果复制操作成功,则为 true;否则为 falsetrue if the copy operation succeeds; otherwise, false.

注解

此方法会复制所有的当前内容Memory<T>实例向destination即使当前实例的内容和destination重叠。This method copies all of the contents of the current Memory<T> instance to destination even if the contents of the current instance and destination overlap.

适用于