CodeTypeParameterCollection.CopyTo(CodeTypeParameter[], Int32) 方法

定义

将集合中的项复制到指定一维 Array 的指定索引处。Copies the items in the collection to the specified one-dimensional Array at the specified index.

public:
 void CopyTo(cli::array <System::CodeDom::CodeTypeParameter ^> ^ array, int index);
public void CopyTo (System.CodeDom.CodeTypeParameter[] array, int index);
member this.CopyTo : System.CodeDom.CodeTypeParameter[] * int -> unit
Public Sub CopyTo (array As CodeTypeParameter(), index As Integer)

参数

array
CodeTypeParameter[]

一维 Array,它是从集合所复制值的目标位置。The one-dimensional Array that is the destination of the values copied from the collection.

index
Int32

插入开始处的数组的索引。The index of the array at which to begin inserting.

例外

array 是多维的。array is multidimensional.

- 或 --or- CodeTypeParameterCollection 中的元素数大于 index 所指定的目标数组索引位置与目标数组结尾位置之间的可用空间。The number of elements in the CodeTypeParameterCollection is greater than the available space between the index of the target array specified by index and the end of the target array.

arraynullarray is null.

index 小于目标数组的最低索引。index is less than the target array's lowest index.

适用于