Nu/Nu.Math/OrderedDictionary.cs
/// <summary>
/// Removes the key/value pair at the given index.
/// </summary>
/// <param name="index">The index of the key/value pair to remove.</param>
/// <exception cref="System.ArgumentOutOfRangeException">The index is negative -or- larger than the size of the dictionary.</exception>
Removes the key/value pair at the given index.
Removes the key / value pair at the given index .
public void RemoveAt(int index)
        {
            var key = keys[index];
            for (int keyIndex = index + 1; keyIndex < keys.Count; ++keyIndex)
            {
                var otherKey = keys[keyIndex];
                dictionary[otherKey] -= 1;
            }
            dictionary.Remove(key);
            keys.RemoveAt(index);
            values.RemoveAt(index);
            ++version;
        }
public void RemoveAt ( int index ) { var key = keys [ index ] ; for ( int keyIndex = index + 1 ; keyIndex < keys . Count ; ++ keyIndex ) { var otherKey = keys [ keyIndex ] ; dictionary [ otherKey ] -= 1 ; } dictionary . Remove ( key ) ; keys . RemoveAt ( index ) ; values . RemoveAt ( index ) ; ++ version ; }
Removes the key/value pair at the given index.
Removes the key / value pair at the given index .
The index is negative -or- larger than the size of the dictionary.
The index is negative - or - larger than the size of the dictionary .
index
int
The index of the key/value pair to remove.
The index of the key / value pair to remove .