Reputation: 14835
How do I remove all objects in a List on Windows Phone 7 Silverlight C# (latest SDK)?
The method myList.RemoveAll()
does not exist.
Thanks.
Upvotes: 1
Views: 405
Reputation: 1
Proper Clearing of a List Box
listName.Items.Clear(); listName.SelectedItem = null;
Upvotes: 0
Reputation: 39
I can think of three ways to do this,
myList.Clear();
myList = null;
myList = new List<yourType>();
Upvotes: 2