Condividi tramite


CompilerErrorCollection.Insert(Int32, CompilerError) Metodo

Definizione

Inserisce l'oggetto CompilerError specificato nell'insieme in corrispondenza dell'indice specificato.

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)

Parametri

index
Int32

Indice con inizio zero in cui viene inserito l'errore di compilazione.

value
CompilerError

Oggetto CompilerError da inserire.

Esempio

Nell'esempio seguente viene illustrato come utilizzare il Insert metodo per inserire un CompilerError oggetto in un oggetto CompilerErrorCollection.

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

Si applica a

Vedi anche