The following is the integer array.
int[] arr = { 99, 43, 86 };To sort, use the Sort() method.
Array.Sort(arr);
The following is the complete code displaying how to sort an array in C# using the Sort() method.
Example
using System;
class Demo {
static void Main() {
int[] arr = { 99, 43, 86 };
// sort
Array.Sort(arr);
Console.WriteLine("Sorted List");
foreach (int res in arr) {
Console.Write("\n"+res);
}
Console.WriteLine();
}
}Output
Sorted List 43 86 99