Dictionary<TKey,TValue>.ValueCollection.ICollection<TValue>.Remove メソッド

定義

特定のオブジェクトが ICollection<T> 内にあるときに、最初に出現したものを削除します。 この実装は常に NotSupportedException をスローします。

 virtual bool System.Collections.Generic.ICollection<TValue>.Remove(TValue item) = System::Collections::Generic::ICollection<TValue>::Remove;
bool ICollection<TValue>.Remove (TValue item);
abstract member System.Collections.Generic.ICollection<TValue>.Remove : 'Value -> bool
override this.System.Collections.Generic.ICollection<TValue>.Remove : 'Value -> bool
Function Remove (item As TValue) As Boolean Implements ICollection(Of TValue).Remove

パラメーター

item
TValue

ICollection<T> から削除するオブジェクト。

戻り値

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

実装

例外

常にスローされます。

注釈

オブジェクトが等しいかどうかを判断する方法で実装が異なります。たとえば、List<T> では Default が使用されます。また、Dictionary<TKey,TValue> では、IComparer<T> 実装をキーの比較に使うかどうかをユーザーが指定できます。

適用対象

こちらもご覧ください