CompilerErrorCollection.Insert(Int32, CompilerError) Método

Definición

Inserta la clase CompilerError especificada en el índice especificado de la colección.

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

Índice de base cero donde debe insertarse el error del compilador.

value
CompilerError

CompilerError que se va a insertar.

Ejemplos

En el ejemplo siguiente se muestra cómo usar el Insert método para insertar un CompilerError objeto en .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"))

Se aplica a

Consulte también