Skip to main content

ContainsKey Method

Determines whether the IDictionary(TKey, TValue) contains an element with the specified key.

Definition

Namespace: Avalonia.Collections
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public bool ContainsKey(
TKey key
)

Parameters

  TKey
The key to locate in the IDictionary(TKey, TValue).

Return Value

Boolean
true if the IDictionary(TKey, TValue) contains an element with the key; otherwise, false.

Implements

IDictionary(TKey, TValue).ContainsKey(TKey)
IReadOnlyDictionary(TKey, TValue).ContainsKey(TKey)

Exceptions

ArgumentNullExceptionkey is null.

See Also

Reference

AvaloniaDictionary(TKey, TValue) Class
Avalonia.Collections Namespace