Answer: With the help of Clear() Static method of List collection,we can remove all the items from List collection.
For Example:-
List<int> lst_id = new List<int>();
lst_id.Add(1);
lst_id.Add(2);
//To remove all items from lst_id
lst_id.Clear();
Asked In: Many Interviews |
Alert Moderator