共用方式為


IReadOnlyDictionary<TKey, TValue>.ContainsKey 方法

判斷字典是否包含某個特定的鍵。

命名空間:  Microsoft.BusinessData.Infrastructure.Collections
組件:  Microsoft.BusinessData (在 Microsoft.BusinessData.dll 中)

語法

'宣告
Function ContainsKey ( _
    key As TKey _
) As Boolean
'用途
Dim instance As IReadOnlyDictionary
Dim key As TKey
Dim returnValue As Boolean

returnValue = instance.ContainsKey(key)
bool ContainsKey(
    TKey key
)

參數

  • key
    類型:TKey

    若要搜尋指定索引鍵。

傳回值

類型:System.Boolean
true如果找不到索引鍵。否則, false。

請參閱

參照

IReadOnlyDictionary<TKey, TValue> 介面

IReadOnlyDictionary<TKey, TValue> 成員

Microsoft.BusinessData.Infrastructure.Collections 命名空間