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

定義

多載

Remove(KeyValuePair<TKey,TValue>)

從不可變字典中移除第一個出現的特定物件。

Remove(TKey)

從不可變的字典中移除具有指定之索引鍵的項目。

Remove(KeyValuePair<TKey,TValue>)

Source:
ImmutableDictionary_2.Builder.cs
Source:
ImmutableDictionary_2.Builder.cs
Source:
ImmutableDictionary_2.Builder.cs

從不可變字典中移除第一個出現的特定物件。

public:
 virtual bool Remove(System::Collections::Generic::KeyValuePair<TKey, TValue> item);
public bool Remove (System.Collections.Generic.KeyValuePair<TKey,TValue> item);
abstract member Remove : System.Collections.Generic.KeyValuePair<'Key, 'Value> -> bool
override this.Remove : System.Collections.Generic.KeyValuePair<'Key, 'Value> -> bool
Public Function Remove (item As KeyValuePair(Of TKey, TValue)) As Boolean

參數

item
KeyValuePair<TKey,TValue>

要從字典中移除的物件。

傳回

如果已成功從字典中移除 item,則為 true,否則為 false。 如果在字典中找不到 item,這個方法也會傳回 false。

實作

例外狀況

字典是唯讀的。

適用於

Remove(TKey)

Source:
ImmutableDictionary_2.Builder.cs
Source:
ImmutableDictionary_2.Builder.cs
Source:
ImmutableDictionary_2.Builder.cs

從不可變的字典中移除具有指定之索引鍵的項目。

public:
 virtual bool Remove(TKey key);
public bool Remove (TKey key);
abstract member Remove : 'Key -> bool
override this.Remove : 'Key -> bool
Public Function Remove (key As TKey) As Boolean

參數

key
TKey

要移除的項目索引鍵。

傳回

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

實作

例外狀況

key 為 null。

字典是唯讀的。

適用於