Thursday, 15 October 2015

Sort the Element of Array using Sort Function

using System;
class Program
{
    static void Main()
    {
        int[] testarray = new int[] { 10, 5, 15, 85, 25, 65, 84, 17, 28 };
        Array.Sort(testarray);
        foreach (int i in testarray)
        {
            Console.Write(i + "\t");
        }
        Console.WriteLine("\n");
    }
}

No comments:

Post a Comment