ReadOnlySpan<T>.CopyTo(Span<T>) ReadOnlySpan<T>.CopyTo(Span<T>) ReadOnlySpan<T>.CopyTo(Span<T>) ReadOnlySpan<T>.CopyTo(Span<T>) Method

定义

将此 ReadOnlySpan<T> 的内容复制到目标 Span<T>Copies the contents of this ReadOnlySpan<T> into a destination Span<T>.

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

参数

destination
Span<T> Span<T> Span<T> Span<T>

要将项复制到的范围。The span to copy items into.

异常

destination 短于源 ReadOnlySpan<T>destination is shorter than the source ReadOnlySpan<T>.

注解

source destination如果和重叠destination , 则会将整个的处理方式视为在将其复制到之前将其复制到临时位置。 sourceIf the source and destination overlap, the entirety of source is handled as if it was copied to a temporary location before it is copied to destination.

适用于