CompilerErrorCollection.Remove Method (CompilerError)


Removes a specific CompilerError from the collection.

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

public void Remove(
	CompilerError value

Exception Condition

The specified object is not found in the collection.

The following example demonstrates how to remove a CompilerError item from a CompilerErrorCollection.

// Removes the specified CompilerError from the collection.
CompilerError error = new CompilerError("Testfile.cs", 5, 10, "CS0001", "Example error text");
collection.Remove( error );

.NET Framework
Available since 1.1
Return to top