ConditionalWeakTable<TKey,TValue>.Remove 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| Remove(TKey) |
從表格移除索引鍵和其值。 |
| Remove(TKey, TValue) |
Remove(TKey)
從表格移除索引鍵和其值。
public:
bool Remove(TKey key);
public bool Remove(TKey key);
member this.Remove : 'Key -> bool
Public Function Remove (key As TKey) As Boolean
參數
- key
- TKey
要移除的索引鍵。
傳回
如果已找到並移除索引鍵則為 true,否則為 false。
例外狀況
key 為 null。
備註
如果在這項作業期間垃圾收集索引鍵,方法就不會引發例外狀況,而且傳回值未定義。
適用於
Remove(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