CollectionUtilities..::..GetKeys<(Of <(<'TKey, TValue>)>)> Method

Gets the keys as a readonly collection.

Namespace:  Tortuga.Anchor
Assembly:  Tortuga.Anchor (in Tortuga.Anchor.dll)

Syntax


public static ReadOnlyCollection<TKey> GetKeys<TKey, TValue>(
	ConcurrentDictionary<TKey, TValue> dictionary
)
Public Shared Function GetKeys(Of TKey, TValue) ( _
	dictionary As ConcurrentDictionary(Of TKey, TValue) _
) As ReadOnlyCollection(Of TKey)

Type Parameters

TKey
The type of the key.
TValue
The type of the value.

Parameters

dictionary
Type: ConcurrentDictionary<(Of <(<'TKey, TValue>)>)>
The dictionary.

Return Value

Remarks


This is just a cast. It accounts for an API bug in ConcurrentDictionary.