Check out example codes for "c# sort array". It will help you in understanding the concepts better.
Code Example 1
int[] arr = { 3, 6, 4, 1 };
// arr will be { 1, 3, 4, 6 }
Array.Sort(arr);
// arr will be { 6, 4, 3, 1 }
Array.Sort(arr);
Array.Reverse(arr);
Code Example 2
int[] sortedCopy = from element in copyArray
orderby element ascending select element;
Code Example 3
Array.Sort(arr);
Learn ReactJs, React Native from akashmittal.com