ReadOnlyDictionary<TKey,TValue>.ValueCollection.ICollection<TValue>.Remove 方法

定义

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

要从集合中移除的对象。

返回

true 如果 item 已成功从集合中删除,则为 ;否则为 false。 如果原始集合中找不到项,此方法也会返回 false

实现

例外

在所有情况下。

注解

此成员是显式接口成员实现。 仅当实例强制转换为ReadOnlyDictionary<TKey,TValue>.ValueCollection接口时ICollection<T>,才能使用它。 ICollection<T> 接口指定如果实现接口的集合是只读的,则该 Remove 方法应引发 NotSupportedException 异常。

适用于