/// <summary> /// Merge sorts list of elements. Can be chosen if topDown or BottomUp by passing true or false value as argument to the method. By default it is topDown /// </summary> /// <typeparam name="T"></typeparam> /// <param name="collection">List of elements</param> /// <param name="isTopDown">true or false whether is top down or bottom up</param> private static void MergeSort <T>(IList <T> collection, bool isTopDown = true) where T : IComparable { MergeSorter sorter = new MergeSorter(); var returned = sorter.SplitThenSort(collection, isTopDown); PrintCollection(returned); }