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

定義

特定のオブジェクトの最初の出現箇所を ICollection<T>から削除します。 この実装では、常に NotSupportedExceptionがスローされます。

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

パラメーター

item
TKey

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

返品

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

実装

例外

常にスローされます。

注釈

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

適用対象

こちらもご覧ください