ArraySegment<T>.CopyTo 方法

定义

重载

CopyTo(ArraySegment<T>)

将此实例的内容复制到相同类型 T 的指定目标数组段中。Copies the contents of this instance into the specified destination array segment of the same type T.

CopyTo(T[])

将此实例的内容复制到相同类型 T 的指定目标数组中。Copies the contents of this instance into the specified destination array of the same type T.

CopyTo(T[], Int32)

从指定的目标索引开始,将此实例的内容复制到相同类型 T 的指定目标数组中。Copies the contents of this instance into the specified destination array of the same type T, starting at the specified destination index.

CopyTo(ArraySegment<T>)

将此实例的内容复制到相同类型 T 的指定目标数组段中。Copies the contents of this instance into the specified destination array segment of the same type T.

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

参数

destination
ArraySegment<T>

要将此实例的内容复制到其中的数组段。The array segment into which the contents of this instance will be copied.

例外

此实例的基础数组为 nullThe underlying array of this instance is null.

- 或 --or-

destination 的基础数组为 nullThe underlying array of destination is null.

此实例的基础数组的长度大于 destination 的基础数组的长度。The length of the underlying array of this instance is larger than the length of the underlying array of destination.

CopyTo(T[])

将此实例的内容复制到相同类型 T 的指定目标数组中。Copies the contents of this instance into the specified destination array of the same type T.

public:
 void CopyTo(cli::array <T> ^ destination);
public void CopyTo (T[] destination);
member this.CopyTo : 'T[] -> unit
Public Sub CopyTo (destination As T())

参数

destination
T[]

要将此实例的内容复制到其中的 T 类型的数组。The array of type T into which the contents of this instance will be copied.

例外

此实例的基础数组为 nullThe underlying array of this instance is null.

CopyTo(T[], Int32)

从指定的目标索引开始,将此实例的内容复制到相同类型 T 的指定目标数组中。Copies the contents of this instance into the specified destination array of the same type T, starting at the specified destination index.

public:
 virtual void CopyTo(cli::array <T> ^ destination, int destinationIndex);
public:
 void CopyTo(cli::array <T> ^ destination, int destinationIndex);
public void CopyTo (T[] destination, int destinationIndex);
abstract member CopyTo : 'T[] * int -> unit
override this.CopyTo : 'T[] * int -> unit
member this.CopyTo : 'T[] * int -> unit
Public Sub CopyTo (destination As T(), destinationIndex As Integer)

参数

destination
T[]

要将此实例的内容复制到其中的 T 类型的数组。The array of type T into which the contents of this instance will be copied.

destinationIndex
Int32

destination 内的索引,从此处开始存储。The index in destination at which storing begins.

实现

例外

此实例的基础数组为 nullThe underlying array of this instance is null.

适用于