Dictionary<TKey,TValue>.AlternateLookup<TAlternateKey>.Remove 方法

定义

重载

Remove(TAlternateKey)

Dictionary<TKey,TValue>中删除具有指定备用键的值。

Remove(TAlternateKey, TKey, TValue)

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

Remove(TAlternateKey)

Dictionary<TKey,TValue>中删除具有指定备用键的值。

public:
 bool Remove(TAlternateKey key);
public bool Remove (TAlternateKey key);
member this.Remove : 'AlternateKey -> bool
Public Function Remove (key As TAlternateKey) As Boolean

参数

key
TAlternateKey

要删除的元素的备用键。

返回

如果成功找到并删除了元素,则 true;否则,false

例外

key null

适用于

Remove(TAlternateKey, TKey, TValue)

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

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

参数

key
TAlternateKey

要删除的元素的备用键。

actualKey
TKey

此方法返回时,包含已删除的键。

value
TValue

此方法返回时,包含已删除的元素。

返回

如果成功找到并删除了元素,则 true;否则,false

例外

key null

适用于