Dictionary<TKey,TValue>.AlternateLookup<TAlternateKey>.Remove 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
Remove(TAlternateKey) |
從 Dictionary<TKey,TValue>移除具有指定替代索引鍵的值。 |
Remove(TAlternateKey, TKey, TValue) |
從 Dictionary<TKey,TValue>中移除具有指定替代索引鍵的值,並將專案複製到 value 參數。 |
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>中移除具有指定替代索引鍵的值,並將專案複製到 value 參數。
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
。