1

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.

3 Answers 3

9

You should be able to use:

myList.Clear()
2

I can think of three ways to do this,

  • myList.Clear();
  • myList = null;
  • myList = new List<yourType>();
0

Proper Clearing of a List Box

listName.Items.Clear(); listName.SelectedItem = null;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.