Share via


CompilerErrorCollection.Add(CompilerError) Método

Definição

Adiciona o objeto CompilerError especificado à coleção de erros.

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

O objeto CompilerError a ser adicionado.

Retornos

O índice no qual o novo elemento foi inserido.

Exemplos

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

Aplica-se a

Confira também