Click or drag to resize
Accord.NET (logo)

RedBlackTreeDictionaryTKey, TValueTryGetPrevious Method

Gets the next key-value pair in the dictionary whose key is the immediate ancestor of the given key.

Namespace:  Accord.Collections
Assembly:  Accord (in Accord.dll) Version: 3.8.0
public bool TryGetPrevious(
	TKey key,
	out KeyValuePair<TKey, TValue> prev
Request Example View Source


Type: TKey
The key whose ancestor must be found.
Type: System.Collections.GenericKeyValuePairTKey, TValue
The key-value pair whose key is the immediate ancestor of key, returned as an out parameter.

Return Value

Type: Boolean
True if there was an ancestor in the dictionary; false otherwise.
See Also