Freigeben über


CompilerErrorCollection.Add-Methode

Fügt der Fehlerauflistung die angegebene CompilerError-Klasse hinzu.

Namespace: System.CodeDom.Compiler
Assembly: System (in system.dll)

Syntax

'Declaration
Public Function Add ( _
    value As CompilerError _
) As Integer
'Usage
Dim instance As CompilerErrorCollection
Dim value As CompilerError
Dim returnValue As Integer

returnValue = instance.Add(value)
public int Add (
    CompilerError value
)
public:
int Add (
    CompilerError^ value
)
public int Add (
    CompilerError value
)
public function Add (
    value : CompilerError
) : int

Parameter

Rückgabewert

Der Index, an dem das neue Element eingefügt wurde.

Beispiel

' 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") );
// 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"));

Plattformen

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

CompilerErrorCollection-Klasse
CompilerErrorCollection-Member
System.CodeDom.Compiler-Namespace
AddRange