Click or drag to resize

RankedDictionaryTKey, TValueKeyCollectionIndexOf Method

Gets the index of the supplied key.

Namespace:  Kaos.Collections
Assembly:  KaosCollections (in KaosCollections.dll) Version: 4.2.0.0
Syntax
C#
public int IndexOf(
	TKey key
)

Parameters

key
Type: TKey
The key to find.

Return Value

Type: Int32
The index of key if found; otherwise a negative value holding the bitwise complement of the insert point.
Remarks

If key is not found, apply the bitwise complement operator (~) to the result to get the index of the next higher key.

This is a O(log n) operation.

See Also