CodeCatchClauseCollection.CopyTo(CodeCatchClause[], Int32) Yöntem

Tanım

Koleksiyon nesnelerini belirtilen dizinden başlayarak tek boyutlu Array bir örneğe kopyalar.

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

Parametreler

array
CodeCatchClause[]

Koleksiyondan kopyalanan değerlerin hedefi olan tek boyutlu Array .

index
Int32

Eklemeye başlanması gereken dizinin dizini.

Özel durumlar

Hedef dizi çok boyutludur.

-veya-

içindeki CodeCatchClauseCollection öğe sayısı, parametresi tarafından index belirtilen hedef dizinin dizini ile hedef dizinin sonu arasındaki kullanılabilir boşluktan büyüktür.

array parametresi null'dir.

index parametresi, hedef dizinin en düşük dizininden küçüktür.

Örnekler

Aşağıdaki örnekte, dizinin içeriğinin 0 dizin değerinden CodeCatchClauseCollection başlayarak bir CodeCatchClause diziye nasıl kopyalanması gösterilmektedir.

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

Şunlara uygulanır

Ayrıca bkz.