CodeTypeDeclarationCollection.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 CodeTypeDeclaration(), _
index As Integer _
)
'Usage
Dim instance As CodeTypeDeclarationCollection
Dim array As CodeTypeDeclaration()
Dim index As Integer
instance.CopyTo(array, index)
public void CopyTo (
CodeTypeDeclaration[] array,
int index
)
public:
void CopyTo (
array<CodeTypeDeclaration^>^ array,
int index
)
public void CopyTo (
CodeTypeDeclaration[] array,
int index
)
public function CopyTo (
array : CodeTypeDeclaration[],
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 |
---|---|
Das Zielarray ist mehrdimensional. – oder – Die Anzahl der Elemente in der CodeTypeDeclarationCollection 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. |
|
Der array-Parameter ist NULL (Nothing in Visual Basic). |
|
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 CodeTypeDeclaration array.
' 'declarations' is a CodeTypeDeclaration array.
collection.CopyTo(declarations, 0)
// Copies the contents of the collection, beginning at index 0,
// to the specified CodeTypeDeclaration array.
// 'declarations' is a CodeTypeDeclaration array.
collection.CopyTo( declarations, 0 );
// Copies the contents of the collection, beginning at index 0,
// to the specified CodeTypeDeclaration array.
// 'declarations' is a CodeTypeDeclaration array.
collection->CopyTo( declarations, 0 );
// Copies the contents of the collection, beginning at index 0,
// to the specified CodeTypeDeclaration array.
// 'declarations' is a CodeTypeDeclaration array.
collection.CopyTo(declarations, 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
CodeTypeDeclarationCollection-Klasse
CodeTypeDeclarationCollection-Member
System.CodeDom-Namespace
Array-Klasse