ILookup<TKey,TElement>.Contains(TKey) 方法

定義

判斷指定的索引鍵是否存在於 ILookup<TKey,TElement>

public:
 bool Contains(TKey key);
public bool Contains (TKey key);
abstract member Contains : 'Key -> bool
Public Function Contains (key As TKey) As Boolean

參數

key
TKey

要在 ILookup<TKey,TElement> 中搜尋的索引鍵。

傳回

如果 key 位於 ILookup<TKey,TElement> 中,則為 true,否則為 false

適用於