ConcurrentDictionary<TKey,TValue>.ContainsKey(TKey) 方法

定義

判斷 ConcurrentDictionary<TKey,TValue> 是否包含特定索引鍵。

public:
 virtual bool ContainsKey(TKey key);
public bool ContainsKey (TKey key);
abstract member ContainsKey : 'Key -> bool
override this.ContainsKey : 'Key -> bool
Public Function ContainsKey (key As TKey) As Boolean

參數

key
TKey

要在 ConcurrentDictionary<TKey,TValue> 中尋找的索引鍵。

傳回

如果 true 包含具有指定索引鍵的項目,則為 ConcurrentDictionary<TKey,TValue>,否則為 false

實作

例外狀況

keynull

適用於

另請參閱