Share via


CodeCommentStatementCollection.Remove(CodeCommentStatement) Methode

Definition

Entfernt das angegebene CodeCommentStatement-Objekt aus der Auflistung.

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)

Parameter

value
CodeCommentStatement

Das CodeCommentStatement-Objekt, das aus der Auflistung entfernt werden soll.

Ausnahmen

Das angegebene Objekt wurde nicht in der Auflistung gefunden.

Beispiele

Im folgenden Beispiel wird veranschaulicht, wie Sie die Remove -Methode verwenden, um ein CodeCommentStatement -Objekt aus CodeCommentStatementCollectionzu löschen.

// 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)

Gilt für: