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 );
' Copies the contents of the collection, beginning at index 0, 
' to the specified CodeTypeReference array.
' 'references' is a CodeTypeReference array.
collection.CopyTo(references, 0)

適用対象

こちらもご覧ください