ReadOnlyDictionary<TKey,TValue>.IDictionary.Contains(Object) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
判斷字典中是否包含具有指定鍵值的元素。
virtual bool System.Collections.IDictionary.Contains(System::Object ^ key) = System::Collections::IDictionary::Contains;
bool IDictionary.Contains(object key);
abstract member System.Collections.IDictionary.Contains : obj -> bool
override this.System.Collections.IDictionary.Contains : obj -> bool
Function Contains (key As Object) As Boolean Implements IDictionary.Contains
參數
- key
- Object
關鍵是要在字典中找到。
傳回
true如果字典包含具有指定鍵的元素;否則,。 false
實作
例外狀況
key 是 null。
備註
此成員為明確介面成員實作。 它只能在實 ReadOnlyDictionary<TKey,TValue> 例投射到 IDictionary 介面時使用。