Sorting integer array in c#

Saratvaddilli
Posted by Saratvaddilli under C# category on | Points: 40 | Views : 1627
// Declaring an integer array
int[] intArray = new int[7] { 7,2,6,4,1,5,3 };
//Sorting an integer array
Array.Sort(intArray);
// write array
foreach (int i in intArray) Response.Write(i + " ");

Comments or Responses

Login to post response