/// <summary> /// Initialize the sorted list. Start with specified collection, specified comparer /// </summary> /// <param name="collection">Collection to start with. Automatically sorted</param> /// <param name="comparer">Comparer object to utilize in sorting operations</param> public SortedList(IEnumerable <T> collection, IComparer <T> comparer) { m_Stored = QuickSort.Sort(collection, comparer); m_Comparer = comparer; }
/// <summary> /// Initialize the sorted list. Start with specified collection, default comparer /// </summary> /// <param name="collection">Collection to start with. Automatically sorted</param> public SortedList(IEnumerable <T> collection) { m_Stored = QuickSort.Sort(collection, Comparer <T> .Default); m_Comparer = Comparer <T> .Default; }