Core/CafeLib.Core.Collections/Dictionary/OrderedDictionary.cs
/// <summary>
/// Adds an entry with the specified key and value into the <see cref="OrderedDictionary{TKey,TValue}">OrderedDictionary&lt;TKey,TValue&gt;</see> collection with the lowest available index.
/// </summary>
/// <param name="key">The key of the entry to add.</param>
/// <param name="value">The value of the entry to add. This value can be <null/>.</param>
/// <returns>The index of the newly added entry</returns>
/// <remarks>A key cannot be <null/>, but a value can be.
/// <para>You can also use the <see cref="P:OrderedDictionary{TKey,TValue}.Item(TKey)"/> property to add new elements by setting the value of a key that does not exist in the <see cref="OrderedDictionary{TKey,TValue}">OrderedDictionary&lt;TKey,TValue&gt;</see> collection; however, if the specified key already exists in the <see cref="OrderedDictionary{TKey,TValue}">OrderedDictionary&lt;TKey,TValue&gt;</see>, setting the <see cref="P:OrderedDictionary{TKey,TValue}.Item(TKey)"/> property overwrites the old value. In contrast, the <see cref="M:Add"/> method does not modify existing elements.</para></remarks>
/// <exception cref="ArgumentNullException"><paramref name="key"/> is <null/></exception>
/// <exception cref="ArgumentException">An element with the same key already exists in the <see cref="OrderedDictionary{TKey,TValue}">OrderedDictionary&lt;TKey,TValue&gt;</see></exception>
Adds an entry with the specified key and value into the OrderedDictionary
Adds an entry with the specified key and value into the OrderedDictionary
int IOrderedDictionary<TKey, TValue>.Add(TKey key, TValue value)
        {
            Dictionary.Add(key, value);
            List.Add(new KeyValuePair<TKey, TValue>(key, value));
            return Count - 1;
        }
int IOrderedDictionary < TKey , TValue > . Add ( TKey key , TValue value ) { Dictionary . Add ( key , value ) ; List . Add ( new KeyValuePair < TKey , TValue > ( key , value ) ) ; return Count - 1 ; }
Adds an entry with the specified key and value into the OrderedDictionary<TKey,TValue>
Adds an entry with the specified key and value into the OrderedDictionary<TKey TValue >
The index of the newly added entry
The index of the newly added entry
None
An element with the same key already exists in the OrderedDictionary
An element with the same key already exists in the OrderedDictionary
key
TKey
The key of the entry to add.
The key of the entry to add .
value
TValue
The value of the entry to add. This value can be .
The value of the entry to add . This value can be .
remarks
A key cannot be , but a value can be.
You can also use the  property to add new elements by setting the value of a key that does not exist in the OrderedDictionaryOrderedDictionary property overwrites the old value. In contrast, the  method does not modify existing elements.
A key cannot be but a value can be . You can also use the property to add new elements by setting the value of a key that does not exist in the OrderedDictionaryOrderedDictionary property overwrites the old value . In contrast the method does not modify existing elements .