語言

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

定義

多載

名稱 Description
Remove(KeyValuePair<TKey,TValue>)

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

Remove(TKey)

從不可變字典中移除具有指定索引鍵的專案。

Remove(KeyValuePair<TKey,TValue>)

來源:
ImmutableDictionary_2.Builder.cs
來源:
ImmutableDictionary_2.Builder.cs
來源:
ImmutableDictionary_2.Builder.cs
來源:
ImmutableDictionary_2.Builder.cs
來源:
ImmutableDictionary_2.Builder.cs
來源:
ImmutableDictionary_2.Builder.cs
來源:
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>

要從字典中移除的物件。

傳回

true 如果 item 成功從字典中移除;否則, false。 若 item 字典中找不到 ,此方法也會回傳 false。

實作

例外狀況

字典為唯讀。

適用於

Remove(TKey)

來源:
ImmutableDictionary_2.Builder.cs
來源:
ImmutableDictionary_2.Builder.cs
來源:
ImmutableDictionary_2.Builder.cs
來源:
ImmutableDictionary_2.Builder.cs
來源:
ImmutableDictionary_2.Builder.cs
來源:
ImmutableDictionary_2.Builder.cs
來源:
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 若false字典中找不到 ,此方法也會回傳key。

實作

例外狀況

key 為 null。

字典為唯讀。

適用於