You can used build in function present in the c#.
Please see the below example
using System;
class Program
{
static void Main()
{
int[] values = {1,5,3,0,3,5,7 };
Array.Sort(values);
foreach (int value in values)
{
Console.Write(value);
Console.Write(' ');
}
Console.WriteLine();
}
}