語言

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>的物件。

傳回

true 若 item 成功從 ICollection<T>中移除;否則, false。 若 false 未在 中,item此方法也會回傳ICollection<T>。

實作

例外狀況

總是被拋棄;本合集僅供閱讀。

備註

實作方式在決定物件相等的方式上可能有所不同;例如, List<T> 使用 Default,而 則 SortedDictionary<TKey,TValue> 允許使用者指定 IComparer<T> 用於比較金鑰的實作。

適用於

另請參閱