Click or drag to resize

RouletteDictionaryTKey, TValueGetRandomKeyAndValue Method

Gets a random key-value pair from the dictionary.

Namespace:  Scaleout.Collections
Assembly:  Scaleout.Collections (in Scaleout.Collections.dll) Version: 1.0.3.0 (1.0.3.0)
Syntax
C#
public KeyValuePair<TKey, TValue> GetRandomKeyAndValue()

Return Value

Type: KeyValuePairTKey, TValue
A random entry from the dictionary.
Exceptions
ExceptionCondition
InvalidOperationException The dictionary is empty.
See Also