CompilerErrorCollection.Remove(CompilerError) 方法

定义

从集合中删除特定 CompilerError 项。

public:
 void Remove(System::CodeDom::Compiler::CompilerError ^ value);
public void Remove(System.CodeDom.Compiler.CompilerError value);
member this.Remove : System.CodeDom.Compiler.CompilerError -> unit
Public Sub Remove (value As CompilerError)

参数

value
CompilerError

CompilerError 从中删除的 CompilerErrorCollection

例外

集合中找不到指定的对象。

示例

以下示例演示如何从 . CompilerError中删除项CompilerErrorCollection

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

适用于