次の方法で共有


CodeCatchClauseCollection.CopyTo メソッド

指定したインデックスをコピー開始位置として、1 次元の Array インスタンスにコレクション オブジェクトをコピーします。

Public Sub CopyTo( _
   ByVal array() As CodeCatchClause, _   ByVal index As Integer _)
[C#]
public void CopyTo(CodeCatchClause[] array,intindex);
[C++]
public: void CopyTo(CodeCatchClause* array[],intindex);
[JScript]
public function CopyTo(
   array : CodeCatchClause[],index : int);

パラメータ

  • array
    コレクションから値がコピーされる先の 1 次元の Array
  • index
    挿入の開始位置を示す、配列内のインデックス。

例外

例外の種類 条件
ArgumentException 配列先が多次元です。

または

CodeCatchClauseCollection 内の要素の数が、index パラメータで指定されたターゲット配列のインデックスからターゲット配列の末尾までの間にある使用可能な空間の大きさを超えています。

ArgumentNullException array パラメータが null 参照 (Visual Basic では Nothing) です。
ArgumentOutOfRangeException index パラメータが、ターゲット配列の最小インデックスより小さい値です。

使用例

 
' Copies the contents of the collection beginning at index 0 to the specified CodeCatchClause array.
' 'clauses' is a CodeCatchClause array.
collection.CopyTo(clauses, 0)

[C#] 
// Copies the contents of the collection beginning at index 0 to the specified CodeCatchClause array.
// 'clauses' is a CodeCatchClause array.
collection.CopyTo( clauses, 0 );

[C++] 
// Copies the contents of the collection beginning at index 0 to the specified CodeCatchClause array.
// 'clauses' is a CodeCatchClause array.
collection->CopyTo( clauses, 0 );

[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

参照

CodeCatchClauseCollection クラス | CodeCatchClauseCollection メンバ | System.CodeDom 名前空間 | Array