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>から削除するオブジェクト。

返品

true itemICollection<T>から正常に削除された場合は。それ以外の場合はfalse。 このメソッドは、元のfalseitemが見つからない場合にもICollection<T>を返します。

実装

例外

ICollectionは読み取り専用です。

注釈

実装は、オブジェクトの等価性を決定する方法によって異なる場合があります。たとえば、 List<T>Defaultを使用しますが、 Dictionary<TKey,TValue> では、キーの比較に使用する IComparer<T> 実装を指定できます。

リストなどの連続する要素のコレクションでは、削除された要素の後に続く要素が上に移動し、空いた場所を占有します。 コレクションにインデックスが付いている場合、移動される要素のインデックスも更新されます。 この動作は、要素が概念的にバケット (ハッシュ テーブルなど) にグループ化されるコレクションには適用されません。

適用対象