LockingDictionaryTKey, TValueKeys Property

Gets an ICollectionT containing the keys of the LockingDictionaryTKey, TValue.

Definition

Namespace: KGySoft.Collections
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
C#
public ICollection<TKey> Keys { get; }

Property Value

ICollectionTKey

Implements

IDictionaryTKey, TValueKeys

Remarks

The returned collection represents a moment-in-time snapshot of the keys of the LockingDictionaryTKey, TValue. It does not reflect any updates to the dictionary after Keys were obtained. The collection is safe to use concurrently with reads from and writes to the dictionary.

This property has an O(n) cost where n is the number of elements in the dictionary.

  Note

The enumerator of the returned collection supports the IEnumerator.Reset method.

See Also