System.Array: Sorting and Searching : Array Sort « Collections Data Structure « C# / C Sharp






System.Array: Sorting and Searching

System.Array: Sorting and Searching
using System;

public class SortingandSearchingArray
{
    public static void Main()
    {
        int[]    arr = {5, 1, 10, 33, 100, 4};
        
        Array.Sort(arr);
        foreach (int v in arr)
        Console.WriteLine("Element: {0}", v);
    }
}
           
       








Related examples in the same category

1.Sorts and array in ascending order, then reverses the elementsSorts and array in ascending order, then reverses the elements