CodeAttributeDeclarationCollection.CopyTo メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
指定したインデックスから始まる 1 次元 Array インスタンスにコレクション オブジェクトをコピーします。
public:
void CopyTo(cli::array <System::CodeDom::CodeAttributeDeclaration ^> ^ array, int index);
public void CopyTo(System.CodeDom.CodeAttributeDeclaration[] array, int index);
member this.CopyTo : System.CodeDom.CodeAttributeDeclaration[] * int -> unit
Public Sub CopyTo (array As CodeAttributeDeclaration(), index As Integer)
パラメーター
- array
- CodeAttributeDeclaration[]
コレクションからコピーされた値のコピー先となる 1 次元 Array 。
- index
- Int32
挿入を開始する配列のインデックス。
例外
コピー先の配列は多次元です。
-又は-
CodeAttributeDeclarationCollection内の要素の数が、index パラメーターで指定されたターゲット配列のインデックスとターゲット配列の末尾の間の使用可能な領域を超えています。
array パラメーターはnull。
index パラメーターは、ターゲット配列の最小インデックスより小さいです。
例
次の例では、インデックス 0 から始まる配列に CodeAttributeDeclarationCollection の内容をコピーする方法を示します。
// Copies the contents of the collection, beginning at index 0,
// to the specified CodeAttributeDeclaration array.
// 'declarations' is a CodeAttributeDeclaration array.
collection.CopyTo( declarations, 0 );
' Copies the contents of the collection beginning at index 0 to the specified CodeAttributeDeclaration array.
' 'declarations' is a CodeAttributeDeclaration array.
collection.CopyTo(declarations, 0)