SortedDictionary<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 項目が ICollection<T>から正常に削除された場合は。それ以外の場合は false。 このメソッドは、ICollection<T>で項目が見つからない場合にもfalseを返します。

実装

例外

常にスローされます。コレクションは読み取り専用です。

注釈

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

適用対象

こちらもご覧ください