Bagikan melalui


CodeCommentStatementCollection.Remove(CodeCommentStatement) Metode

Definisi

Menghapus objek yang ditentukan CodeCommentStatement dari koleksi.

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

Objek CodeCommentStatement yang akan dihapus dari koleksi.

Pengecualian

Objek yang ditentukan tidak ditemukan dalam koleksi.

Contoh

Contoh berikut menunjukkan cara menggunakan Remove metode untuk menghapus CodeCommentStatement objek dari CodeCommentStatementCollection.

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

Berlaku untuk