Share via


IMap<K,V>.HasKey(K) 方法

定義

判斷對應是否包含指定的索引鍵。

public:
 bool HasKey(K key);
bool HasKey(K const& key);
public bool HasKey(K key);
Public Function HasKey (key As K) As Boolean

參數

key
K

與要尋找之專案相關聯的索引鍵。

傳回

Boolean

bool

如果找到索引鍵,則為 True;否則為 false。

備註

使用 .NET 進行程式設計時,此介面會隱藏,開發人員應該使用System.Collections.Generic.IDictionary < TKey,TValue >介面。

適用於

另請參閱