Share via


IReadOnlyDictionary<K,T>.ContainsKey(K) Method

Definition

Determines whether the IReadOnlyDictionary<K,T> contains an element with the specified key.

public bool ContainsKey (K key);
abstract member ContainsKey : 'K -> bool
Public Function ContainsKey (key As K) As Boolean

Parameters

key
K

The key to locate in this IReadOnlyDictionary<K,T>.

Returns

true if the IReadOnlyDictionary<K,T> contains an element with the key; otherwise, false.

Applies to