Click or drag to resize

RankedDictionaryTKey, TValue Constructor (IDictionaryTKey, TValue, IComparerTKey)

Initializes a new dictionary instance that contains key/value pairs copied from the supplied dictionary and sorted by the supplied comparer.

Namespace:  Kaos.Collections
Assembly:  KaosCollections (in KaosCollections.dll) Version: 4.2.0.0
Syntax
C#
public RankedDictionary(
	IDictionary<TKey, TValue> dictionary,
	IComparer<TKey> comparer
)

Parameters

dictionary
Type: System.Collections.GenericIDictionaryTKey, TValue
The dictionary to be copied.
comparer
Type: System.Collections.GenericIComparerTKey
Comparison operator for keys.
Exceptions
ExceptionCondition
ArgumentNullExceptionWhen dictionary is null.
InvalidOperationExceptionWhen comparer is null and no other comparer available.
See Also