Nu/Nu.Math/OrderedDictionary.cs
/// <summary>
/// Gets the index of the given key.
/// </summary>
/// <param name="key">The key to get the index of.</param>
/// <returns>The index of the key in the dictionary -or- -1 if the key is not found.</returns>
/// <remarks>The operation runs in O(n).</remarks>
Gets the index of the given key.
Gets the index of the given key .
public int IndexOf(TKey key)
        {
            if (dictionary.TryGetValue(key, out int index))
            {
                return index;
            }
            return -1;
        }
public int IndexOf ( TKey key ) { if ( dictionary . TryGetValue ( key , out int index ) ) { return index ; } return - 1 ; }
Gets the index of the given key.
Gets the index of the given key .
The index of the key in the dictionary -or- -1 if the key is not found.
The index of the key in the dictionary - or - - 1 if the key is not found .
key
TKey
The key to get the index of.
The key to get the index of .
remarks
The operation runs in O(n).
The operation runs in O ( n ) .