ImmutableDictionary<TKey,TValue>.IDictionary<TKey,TValue>.Remove 方法

定義

從泛型字典中移除具有指定索引鍵的項目。

 virtual bool System.Collections.Generic.IDictionary<TKey,TValue>.Remove(TKey key) = System::Collections::Generic::IDictionary<TKey, TValue>::Remove;
bool IDictionary<TKey,TValue>.Remove (TKey key);
abstract member System.Collections.Generic.IDictionary<TKey,TValue>.Remove : 'Key -> bool
override this.System.Collections.Generic.IDictionary<TKey,TValue>.Remove : 'Key -> bool
Function Remove (key As TKey) As Boolean Implements IDictionary(Of TKey, TValue).Remove

參數

key
TKey

要移除的項目索引鍵。

傳回

如果成功移除項目,則為 true,否則為 false。 如果在原始的泛型字典中找不到 key,則這個方法也會傳回 false

實作

例外狀況

keynull

適用於