語言

OrderedDictionary<TKey,TValue>.Remove 方法

定義

多載

名稱 Description
Remove(TKey)

從 中移除具有指定鍵的 IDictionary<TKey,TValue>元素。

Remove(TKey, TValue)

從 中移除指定鍵的 OrderedDictionary<TKey,TValue> 值,並將該元素複製到值參數。

Remove(TKey)

來源:
OrderedDictionary.cs
來源:
OrderedDictionary.cs
來源:
OrderedDictionary.cs

從 中移除具有指定鍵的 IDictionary<TKey,TValue>元素。

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,此方法也會回傳IDictionary<TKey,TValue>。

實作

例外狀況

key 是 null。

適用於

Remove(TKey, TValue)

來源:
OrderedDictionary.cs
來源:
OrderedDictionary.cs
來源:
OrderedDictionary.cs

從 中移除指定鍵的 OrderedDictionary<TKey,TValue> 值,並將該元素複製到值參數。

public:
 bool Remove(TKey key, [Runtime::InteropServices::Out] TValue % value);
public bool Remove(TKey key, out TValue value);
member this.Remove : 'Key * 'Value -> bool
Public Function Remove (key As TKey, ByRef value As TValue) As Boolean

參數

key
TKey

關鍵是元素要移除。

value
TValue

被移除的元素。

傳回

true若該元素被成功找到並移除;否則,。 false

例外狀況

key 是 null。

適用於