CodeExpressionCollection.Remove(CodeExpression) 方法

定義

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

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

參數

value
CodeExpression

要從集合移除的 CodeExpression 物件。

例外狀況

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

範例

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

// Removes the specified CodeExpression from the collection.
CodeExpression^ expression = gcnew CodePrimitiveExpression( true );
collection->Remove( expression );
// Removes the specified CodeExpression from the collection.
CodeExpression expression = new CodePrimitiveExpression(true);
collection.Remove( expression );
' Removes the specified CodeExpression from the collection.
Dim expression = New CodePrimitiveExpression(True)
collection.Remove(expression)

適用於