Click or drag to resize

OrderedDictionary<TKey, TValue> (IEnumerable<KeyValuePair<TKey, TValue> > , IEqualityComparer<TKey> ) Constructor

Initializes a new instance of the OrderedDictionary<TKey, TValue> class that contains elements copied from the specified [!:IEnumerable<KeyValuePair<TKey, TValue>>] and uses the specified IEqualityComparer<T>.

Namespace: GSF.Collections
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.242-beta+5de70bd1c87865d409ebc16b8886196644c0c750
Syntax
public OrderedDictionary(
	IEnumerable<KeyValuePair<TKey, TValue>> collection,
	IEqualityComparer<TKey> comparer
)
View Source

Parameters

collection  IEnumerable<KeyValuePair<TKey, TValue>>
The [!:IEnumerable<KeyValuePair<TKey, TValue>>] whose elements are copied to the new OrderedDictionary<TKey, TValue>.
comparer  IEqualityComparer<TKey>
The IEqualityComparer<T> implementation to use when comparing keys, or null to use the default EqualityComparer<T> for the type of the key.
Exceptions
ExceptionCondition
ArgumentNullExceptioncollection is null.
ArgumentExceptioncollection contains one or more duplicate keys.
See Also