SortedDictionary<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>中删除的对象。

返回

如果 已成功从 /> 中删除,则为 ;否则为 。 此方法还会返回找不到时

实现

例外

始终引发;集合为只读。

注解

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

适用于

另请参阅