CodeStatementCollection.Remove(CodeStatement) 方法

定义

从集合中移除指定的 CodeStatement 对象。Removes the specified CodeStatement object from the collection.

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

参数

value
CodeStatement

要从该集合中移除的 CodeStatementThe CodeStatement to remove from the collection.

例外

未在集合中找到指定的对象。The specified object is not found in the collection.

示例

下面的示例演示如何使用 Remove 方法 CodeStatement 从中删除对象 CodeStatementCollectionThe following example demonstrates how to use the Remove method to delete a CodeStatement object from a CodeStatementCollection.

// Removes the specified CodeStatement from the collection.
collection->Remove( testStatement );
// Removes the specified CodeStatement from the collection.
collection.Remove( testStatement );
' Removes the specified CodeStatement from the collection.
collection.Remove(testStatement)

适用于