SortedDictionary<TKey,TValue>.ValueCollection.ICollection<TValue>.Remove 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從 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> 用於比較金鑰的實作。