Using Array.Sort() and Array.Reverse() methods.int[] arr = new int[3];
arr[0] = 4;
arr[1] = 1;
arr[2] = 5;
Array.Sort(arr);
Array.Reverse(arr);This code snippet is for how can you sort the elements of the array in descending order.
This code snippet is for how can you sort the elements of the array in descending order.
Using Array.Sort() and Array.Reverse() methods.int[] arr = new int[3];
arr[0] = 4;
arr[1] = 1;
arr[2] = 5;
Array.Sort(arr);
Array.Reverse(arr);