CodeTypeDeclarationCollection.Remove(CodeTypeDeclaration) 方法

定义

从集合中删除指定的 CodeTypeDeclaration 对象。

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

参数

value
CodeTypeDeclaration

CodeTypeDeclaration 从集合中移除的集合。

例外

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

示例

下面的示例演示如何使用该方法从 <a0/> 中删除对象。

// Removes the specified CodeTypeDeclaration from the collection.
CodeTypeDeclaration declaration = new CodeTypeDeclaration("TestType");
collection.Remove( declaration );
' Removes the specified CodeTypeDeclaration from the collection.
Dim declaration As New CodeTypeDeclaration("TestType")
collection.Remove(declaration)

适用于