Answer: Sort method is used for Sorting List collection Items in Ascending Order.
For Example:-
List<int> lst = new List<int>();
lst.Add(2);
lst.Add(1);
lst.Sort();
foreach (int item in lst)
{
Response.Write(item);
}
Output will be 12
Asked In: Many Interviews |
Alert Moderator