OrderedDictionary<TKey,TValue>.Remove 方法

定义

重载

Remove(TKey)

IDictionary<TKey,TValue>中删除具有指定键的元素。

Remove(TKey, TValue)

OrderedDictionary<TKey,TValue> 中删除具有指定键的值,并将元素复制到值参数。

Remove(TKey)

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。 如果在原始 IDictionary<TKey,TValue>中找不到 key,此方法也会返回 false

实现

适用于

Remove(TKey, TValue)

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

适用于