static void ParseCommand(string algorithm, string[] tokens) { Sort.Initialize(new List <int>(tokens.Select(int.Parse).ToArray()), Path.Combine(Directory.GetCurrentDirectory(), "Results")); switch (algorithm.ToLower()) { case "bubble": case "bubblesort": case "1": Sort.BubbleSort(); return; case "insertion": case "insertionsort": case "2": Sort.InsertionSort(); return; case "selection": case "selectionsort": case "3": Sort.SelectionSort(); return; default: return; } }