ContainsKey Method

Task Parallel System.Threading

Determines whether the ConcurrentDictionary<(Of <(TKey, TValue>)>) contains the specified key.

Namespace:  System.Collections.Concurrent
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
Public Function ContainsKey ( _
	key As TKey _
) As Boolean
C#
public bool ContainsKey(
	TKey key
)

Parameters

key
Type: TKey
The key to locate in the ConcurrentDictionary<(Of <(TKey, TValue>)>).

Return Value

true if the ConcurrentDictionary<(Of <(TKey, TValue>)>) contains an element with the specified key; otherwise, false.

Implements

IDictionary<(Of <(TKey, TValue>)>)..::.ContainsKey(TKey)

Exceptions

ExceptionCondition
System..::.ArgumentNullExceptionkey is a null reference (Nothing in Visual Basic).

See Also