Sorting List collection

Rajesh_Kumar
Posted by Rajesh_Kumar under C# category on | Points: 40 | Views : 707
List<string> lst = new List<string>();
lst.Add("2");
lst.Add("1");
lst.Add("Sathua");
lst.Add("Rajesh");
lst.Add("Kumar");
lst.Sort();

foreach (string item in lst)
{
Response.Write(item);
}

Comments or Responses

Login to post response