Freigeben über


CodeCatchClauseCollection.CopyTo-Methode

Kopiert die Auflistungsobjekte in eine eindimensionale Array-Instanz, beginnend am angegebenen Index.

Namespace: System.CodeDom
Assembly: System (in system.dll)

Syntax

'Declaration
Public Sub CopyTo ( _
    array As CodeCatchClause(), _
    index As Integer _
)
'Usage
Dim instance As CodeCatchClauseCollection
Dim array As CodeCatchClause()
Dim index As Integer

instance.CopyTo(array, index)
public void CopyTo (
    CodeCatchClause[] array,
    int index
)
public:
void CopyTo (
    array<CodeCatchClause^>^ array, 
    int index
)
public void CopyTo (
    CodeCatchClause[] array, 
    int index
)
public function CopyTo (
    array : CodeCatchClause[], 
    index : int
)

Parameter

  • array
    Das eindimensionale Array, das das Ziel der aus der Auflistung kopierten Werte ist.
  • index
    Der Index des Arrays, an dem mit dem Einfügen begonnen werden soll.

Ausnahmen

Ausnahmetyp Bedingung

ArgumentException

Das Zielarray ist mehrdimensional.

– oder –

Die Anzahl der Elemente in der CodeCatchClauseCollection ist größer als der verfügbare Platz zwischen dem Index des Zielarrays, der durch den index-Parameter angegeben wird, und dem Ende des Zielarrays.

ArgumentNullException

Der array-Parameter ist NULL (Nothing in Visual Basic).

ArgumentOutOfRangeException

Der index-Parameter ist kleiner als der minimale Index des Zielarrays.

Beispiel

' 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 );
// 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);

Plattformen

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

CodeCatchClauseCollection-Klasse
CodeCatchClauseCollection-Member
System.CodeDom-Namespace
Array-Klasse