Sorting string array in c#

Saratvaddilli
Posted by Saratvaddilli under C# category on | Points: 40 | Views : 1204
//Declaring an string array
string[] stringArray = new string[5] { "X", "B", "Z", "Y", "A" };
//Sorting a string array
Array.Sort(stringArray);
// write array
foreach (string str in stringArray)
Response.Write(str + " ");

Comments or Responses

Login to post response