Freigeben über


CompilerErrorCollection.Insert-Methode

Fügt die angegebene CompilerError-Klasse am angegebenen Index in die Auflistung ein.

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

Syntax

'Declaration
Public Sub Insert ( _
    index As Integer, _
    value As CompilerError _
)
'Usage
Dim instance As CompilerErrorCollection
Dim index As Integer
Dim value As CompilerError

instance.Insert(index, value)
public void Insert (
    int index,
    CompilerError value
)
public:
void Insert (
    int index, 
    CompilerError^ value
)
public void Insert (
    int index, 
    CompilerError value
)
public function Insert (
    index : int, 
    value : CompilerError
)

Parameter

  • index
    Der nullbasierte Index, an dem der Compilerfehler eingefügt werden soll.

Beispiel

' Inserts a CompilerError at index 0 of the collection.
collection.Insert(0, New CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text"))
// Inserts a CompilerError at index 0 of the collection.
collection.Insert( 0, new CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text") );
// Inserts a CompilerError at index 0 of the collection.
collection->Insert( 0, gcnew CompilerError( "Testfile.cs",5,10,"CS0001","Example error text" ) );
// Inserts a CompilerError at index 0 of the collection.
collection.Insert(0, new CompilerError("Testfile.cs", 5, 10, "JSL0001",
    "Example error text"));

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
Add