CodeAttributeArgumentCollection.CopyTo(CodeAttributeArgument[], Int32) メソッド

定義

指定したインデックスから始まる 1 次元 Array インスタンスにコレクション オブジェクトをコピーします。

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

パラメーター

array
CodeAttributeArgument[]

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

index
Int32

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

例外

コピー先の配列は多次元です。

-又は-

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

array パラメーターはnull

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

次の例では、 CodeAttributeArgumentCollection オブジェクトの内容を、指定したインデックス値から始まる CodeAttributeArgument 配列にコピーする方法を示します。

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

適用対象