Select from following answers:- List<string> sortedItems = new List<string>();Enumerable.Range(0, lstItems.Items.Count).ToList.ForEach(i => sortedItems.Add(lstItems.Items[i].ToString()));lstItems.Items.Clear();lstItems.Items.AddRange(sortedItems.OrderBy(o => o).ToArray());
- lstItems.IsSorted = true;
- lstItems.Items.Sorted = true;
- lstItems.Sorted = true;
- All Above
To sort the items in the ListBox set the Sorted property of the ListItem to True.
Show Correct Answer
Asked In: Many Interviews |
Alert Moderator