ReadOnlyDictionary<TKey,TValue>.ValueCollection.ICollection<TValue>.Remove 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在所有情況下都會投 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例外。