Share via


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 方法從 CodeCommentStatementCollection中刪除 CodeCommentStatement 物件。

// Removes the specified CodeCommentStatement from the collection.
CodeCommentStatement^ comment = gcnew CodeCommentStatement( "Test comment" );
collection->Remove( comment );
// 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)

適用於