static void Main(string[] args) { int[] arr = { 9, 5, 4, 6, 8, 3, 1, 7, 2 }; foreach (int x in arr) { Console.WriteLine(x); } SelectionSort.selectionSort(arr); foreach (int x in arr) { Console.WriteLine(x); } string[] word = { "hola", "adios", "elefante", "delfin", "hoz" }; foreach (string x in word) { Console.WriteLine(x); } SelectionSortG.selectionSort(word); foreach (string x in word) { Console.WriteLine(x); } Console.ReadKey(); }
static void Main(string[] args) { int[] arr = { 3, 5, 1, 2, 4 }; SelectionSortG.selectionSort <int>(arr); for (int i = 0; i < arr.Length; i++) { Console.WriteLine(arr[i]); } }