CompilerErrorCollection.Insert(Int32, CompilerError) Methode

Definition

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

public:
 void Insert(int index, System::CodeDom::Compiler::CompilerError ^ value);
public void Insert(int index, System.CodeDom.Compiler.CompilerError value);
member this.Insert : int * System.CodeDom.Compiler.CompilerError -> unit
Public Sub Insert (index As Integer, value As CompilerError)

Parameter

index
Int32

Der nullbasierte Index, in den der Compilerfehler eingefügt werden soll.

value
CompilerError

Der einzufügende Text CompilerError .

Beispiele

Im folgenden Beispiel wird veranschaulicht, wie sie die Insert Methode zum Einfügen eines CompilerError Objekts in ein CompilerErrorCollection.

// 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"))

Gilt für:

Weitere Informationen