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

定义

Memory<T> 对象的内容复制到目标 Memory<T> 对象。Copies the contents of a Memory<T> object into a destination Memory<T> object.

public:
 void CopyTo(Memory<T> destination);
public void CopyTo (Memory<T> destination);
member this.CopyTo : Memory<'T> -> unit
Public Sub CopyTo (destination As Memory(Of T))

参数

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

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

异常

destination 的长度小于当前实例的长度。The length of destination is less than the length of the current instance.

注解

即使当前实例的内容和 destination 重叠,此方法也会将当前 Memory<T> 实例的所有内容复制到 destinationThis 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.

适用于