CompilerErrorCollection.CopyTo-Methode
Kopiert die Auflistungswerte am angegebenen Index in eine eindimensionale Array-Instanz.
Namespace: System.CodeDom.Compiler
Assembly: System (in system.dll)
Syntax
'Declaration
Public Sub CopyTo ( _
array As CompilerError(), _
index As Integer _
)
'Usage
Dim instance As CompilerErrorCollection
Dim array As CompilerError()
Dim index As Integer
instance.CopyTo(array, index)
public void CopyTo (
CompilerError[] array,
int index
)
public:
void CopyTo (
array<CompilerError^>^ array,
int index
)
public void CopyTo (
CompilerError[] array,
int index
)
public function CopyTo (
array : CompilerError[],
index : int
)
Parameter
- array
Die eindimensionale Array-Klasse, die das Ziel der aus der CompilerErrorCollection-Klasse kopierten Werte ist.
- index
Der Index im Array, an dem mit dem Kopieren begonnen wird.
Ausnahmen
Ausnahmetyp | Bedingung |
---|---|
Das durch den array-Parameter angegebene Array ist mehrdimensional. – oder – Die Anzahl der Elemente in CompilerErrorCollection ist größer als der verfügbare Bereich zwischen dem Indexwert des arrayIndex-Parameters im Array, der durch den array-Parameter angegeben ist, und dem durch den array-Parameter angegebenen Ende des Arrays. |
|
Der array-Parameter ist NULL (Nothing in Visual Basic). |
|
Der arrayIndex-Parameter ist niedriger als die Untergrenze des durch den array-Parameter angegebenen Arrays. |
Beispiel
' Copies the contents of the collection, beginning at index 0,
' to the specified CompilerError array.
' 'errors' is a CompilerError array.
collection.CopyTo(errors, 0)
// Copies the contents of the collection, beginning at index 0,
// to the specified CompilerError array.
// 'errors' is a CompilerError array.
collection.CopyTo( errors, 0 );
// Copies the contents of the collection, beginning at index 0,
// to the specified CompilerError array.
// 'errors' is a CompilerError array.
collection->CopyTo( errors, 0 );
// Copies the contents of the collection, beginning at index 0,
// to the specified CompilerError array.
// 'errors' is a CompilerError array.
collection.CopyTo(errors, 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
CompilerErrorCollection-Klasse
CompilerErrorCollection-Member
System.CodeDom.Compiler-Namespace
Array-Klasse