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

要從集合中移除的物件。

傳回

如果已順利從集合中移除 item 則為 true,否則為 false。 如果在原始集合中找不到項目,則這個方法也會傳回 false

實作

例外狀況

在所有情況下。

備註

這個成員是明確介面成員實作, 只有在 ReadOnlyDictionary<TKey,TValue>.ValueCollection 執行個體轉換成 ICollection<T> 介面時,才能使用這個成員。 如果實作介面的集合是唯讀的,介面 ICollection<T>Remove 指定方法應該擲回 NotSupportedException 例外狀況。

適用於