ActivityCollection.ICollection<Activity>.Remove(Activity) 方法

定义

ICollection<T>中删除特定对象的第一个匹配项。

 virtual bool System.Collections.Generic.ICollection<System.Workflow.ComponentModel.Activity>.Remove(System::Workflow::ComponentModel::Activity ^ item) = System::Collections::Generic::ICollection<System::Workflow::ComponentModel::Activity ^>::Remove;
bool ICollection<Activity>.Remove(System.Workflow.ComponentModel.Activity item);
abstract member System.Collections.Generic.ICollection<System.Workflow.ComponentModel.Activity>.Remove : System.Workflow.ComponentModel.Activity -> bool
override this.System.Collections.Generic.ICollection<System.Workflow.ComponentModel.Activity>.Remove : System.Workflow.ComponentModel.Activity -> bool
Function Remove (item As Activity) As Boolean Implements ICollection(Of Activity).Remove

参数

item
Activity

要从 . ICollection<T>中删除的对象。

返回

如果 已成功从 /> 中删除,则为 ;否则为 。 如果在原始false方法中找不到,此方法也会返回。itemICollection<T>

实现

例外

ICollection 只读。

注解

实现在确定对象相等性的方式上可能有所不同;例如, List<T> 使用 Default,而 Dictionary<TKey,TValue> 允许用户指定 IComparer<T> 用于比较键的实现。

在连续元素(如列表)的集合中,已删除元素后面的元素向上移动以占据空置的位置。 如果为集合编制索引,则移动的元素的索引也会更新。 此行为不适用于在概念上将元素分组到存储桶中的集合,例如哈希表。

适用于