Share via


CompilerErrorCollection.Insert(Int32, CompilerError) Método

Definição

Insere o CompilerError especificado na coleção no índice especificado.

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)

Parâmetros

index
Int32

O índice baseado em zero no qual o erro do compilador deve ser inserido.

value
CompilerError

O CompilerError a ser inserido.

Exemplos

O exemplo a seguir demonstra como usar o Insert método para inserir um CompilerError objeto em um 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"))

Aplica-se a

Confira também