CircularSortedListTKey, TValue Constructor

KGy SOFT Core Libraries Help

Namespace:  KGySoft.Collections
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 7.0.0-preview.3

public CircularSortedList()

Every key in a CircularSortedListTKey, TValue must be unique according to the specified comparer.

When TKey is en enum type, the comparer will be the EnumComparer<TEnum>.Comparer. Otherwise, the default comparer Comparer<T>.Default will be chosen. The default comparer checks whether the key type TKey implements IComparableT and uses that implementation, if available. If not, Comparer<T>.Default checks whether the key type TKey implements IComparable. If the key type TKey does not implement either interface, you can specify an IComparableT implementation in a constructor overload that accepts a comparer parameter.

See Also