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

定义

将只读内存区域的内容复制到目标内存区域。Copies the contents of the read-only memory region into a destination memory region.

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>

要将项复制到其中的内存区域。The memory region to copy items into.

异常

destination 比源内存区域更小。destination is smaller than the source memory region.

注解

如果sourcedestination, 此方法的行为就像原始值位于临时位置, 然后覆盖目标。If source and destination, this method behaves as if the original values are in a temporary location before the destination is overwritten.

适用于