CompilerErrorCollection.Add(CompilerError) Método

Definición

Agrega el objeto CompilerError especificado a la colección de errores.

public:
 int Add(System::CodeDom::Compiler::CompilerError ^ value);
public int Add (System.CodeDom.Compiler.CompilerError value);
member this.Add : System.CodeDom.Compiler.CompilerError -> int
Public Function Add (value As CompilerError) As Integer

Parámetros

value
CompilerError

Objeto CompilerError que se agrega.

Devoluciones

Índice donde se insertó el nuevo elemento.

Ejemplos

En el ejemplo siguiente se muestra cómo usar el Add método para agregar un CompilerError objeto a .CompilerErrorCollection

// Adds a CompilerError to the collection.
collection->Add( gcnew CompilerError( "Testfile::cs",5,10,"CS0001","Example error text" ) );
// Adds a CompilerError to the collection.
collection.Add( new CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text") );
' Adds a CompilerError to the collection.
collection.Add(New CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text"))

Se aplica a

Consulte también