Dictionary<TKey,TValue>.AlternateLookup<TAlternateKey>.Remove 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
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
。