/// <summary> /// Creates a new OrderedDictionary. The TKey must implemented IComparable<TKey> /// or IComparable. /// The CompareTo baseMethod of this interface will be used to compare keys in this dictionary. /// </summary> /// <exception cref="InvalidOperationException">TKey does not implement IComparable<TKey>.</exception> public OrderedDictionary() : this(Comparers.DefaultComparer <TKey>()) { }
/// <summary> /// <para>Creates a new OrderedDictionary. The TKey must implemented IComparable<TKey> /// or IComparable. /// The CompareTo baseMethod of this interface will be used to compare keys in this dictionary.</para> /// <para>A collection and keys and values (typically another dictionary) is used to initialized the /// contents of the dictionary.</para> /// </summary> /// <param name="keysAndValues">A collection of keys and values whose contents are used to initialized the dictionary.</param> /// <exception cref="InvalidOperationException">TKey does not implement IComparable<TKey>.</exception> public OrderedDictionary(IEnumerable <KeyValuePair <TKey, TValue> > keysAndValues) : this(keysAndValues, Comparers.DefaultComparer <TKey>()) { }