CodeCommentStatementCollection.Remove(CodeCommentStatement) 方法

定义

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

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

参数

value
CodeCommentStatement

CodeCommentStatement 从集合中移除的对象。

例外

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

示例

下面的示例演示如何使用Remove该方法从中CodeCommentStatement删除CodeCommentStatementCollection对象。

// Removes the specified CodeCommentStatement from the collection.
CodeCommentStatement comment = new CodeCommentStatement("Test comment");
collection.Remove( comment );
' Removes the specified CodeCommentStatement from the collection.
Dim comment As New CodeCommentStatement("Test comment")
collection.Remove(comment)

适用于