ConcurrentDictionary<TKey,TValue>.IDictionary.Contains(Object) ConcurrentDictionary<TKey,TValue>.IDictionary.Contains(Object) ConcurrentDictionary<TKey,TValue>.IDictionary.Contains(Object) Method

定義

取得值,指出 IDictionary<TKey,TValue> 包含具有指定索引鍵的元素。Gets a value that indicates the IDictionary<TKey,TValue> contains an element with the specified key.

 virtual bool System.Collections.IDictionary.Contains(System::Object ^ key) = System::Collections::IDictionary::Contains;
bool IDictionary.Contains (object key);
Function Contains (key As Object) As Boolean Implements IDictionary.Contains

參數

key
Object Object Object

要在 IDictionary<TKey,TValue> 中尋找的索引鍵。The key to locate in the IDictionary<TKey,TValue>.

傳回

如果 true 包含具有指定索引鍵的項目,則為 IDictionary<TKey,TValue>,否則為 falsetrue if the IDictionary<TKey,TValue> contains an element with the specified key; otherwise, false.

實作

例外狀況

適用於

另請參閱