CodeTypeReferenceCollection.CopyTo(CodeTypeReference[], Int32) メソッド

定義

コレクション内の項目を、指定したインデックス位置にある指定した 1 次元 Array にコピーします。

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

パラメーター

array
CodeTypeReference[]

コレクションからコピーされた値のコピー先となる 1 次元 Array

index
Int32

挿入を開始する配列のインデックス。

例外

array パラメーターは多次元です。

-又は-

CodeTypeReferenceCollection内の要素の数が、index パラメーターで指定されたターゲット配列のインデックスとターゲット配列の末尾の間の使用可能な領域を超えています。

array パラメーターはnull

index パラメーターは、ターゲット配列の最小インデックスより小さいです。

// Copies the contents of the collection, beginning at index 0,
// to the specified CodeTypeReference array.
// 'references' is a CodeTypeReference array.
collection.CopyTo( references, 0 );
' Copies the contents of the collection, beginning at index 0, 
' to the specified CodeTypeReference array.
' 'references' is a CodeTypeReference array.
collection.CopyTo(references, 0)

適用対象

こちらもご覧ください