Share via


CodeCatchClauseCollection.Remove(CodeCatchClause) 方法

定義

從集合中移除指定的 CodeCatchClause 物件。

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

參數

value
CodeCatchClause

要從集合移除的 CodeCatchClause 物件。

例外狀況

在集合中找不到指定的物件。

範例

下列範例示範如何使用 Remove 方法從 CodeCatchClauseCollection中刪除 CodeCatchClause 物件。

// Removes the specified CodeCatchClause from the collection.
CodeCatchClause^ clause = gcnew CodeCatchClause( "e" );
collection->Remove( clause );
// Removes the specified CodeCatchClause from the collection.
CodeCatchClause clause = new CodeCatchClause("e");
collection.Remove( clause );
' Removes the specified CodeCatchClause from the collection.
Dim clause As New CodeCatchClause("e")
collection.Remove(clause)

適用於