private static void UseQuickSort() // delegate invoke with runningtime { messages.AppendLine("---[QuickSort]---"); Console.WriteLine(messages); Algoritmer.MultiValuePointer delegate5 = Algoritmer.QuickSort; Algoritmer.DisplayRuningTime(delegate5, array); messages.Clear(); }
private static void UseMergeSort() // delegate invoke with runningtime { try { messages.AppendLine("---[MergeSort]---"); Console.WriteLine(messages); Algoritmer.MultiValuePointer delegate4 = Algoritmer.MergeSort; Algoritmer.DisplayRuningTime(delegate4, array); messages.Clear(); } catch (Exception x) { Console.WriteLine(x.Message); } }
private static void UseSelectionSort() // delegate invoke with runningtime { try { messages.AppendLine("---[SelectionSort]---"); Console.WriteLine(messages); Algoritmer.SingleValuepointer delegate3 = Algoritmer.SelectionSort; Algoritmer.DisplayRuningTime(delegate3, array); messages.Clear(); } catch (Exception x) { Console.WriteLine(x.Message); } }
public static void UseLambdaSort() //lambda sort in place // MÅSTE FIXAS { try { messages.AppendLine("---[Lamda Sort]---"); Console.WriteLine(messages); Algoritmer.SingleValuepointer delegate6 = Algoritmer.LambdaSort; Algoritmer.DisplayRuningTime(delegate6, array); messages.Clear(); } catch (Exception x) { Console.WriteLine(x.Message); } }