List<T>.RemoveAll();

  • Thread starter Thread starter John Young
  • Start date Start date
J

John Young

Hi I have just started messing about with generics.
I have done this..

List<string> myList = new List<string>();

I've added strings to the list...

But now I want to clear the list completely...

myList.RemoveAll( ??? );

What is 'Predicate<string> match' ?? I cannot seem to understand how to
use this. I just want to remove all strings in the list so that the list is
empty again, ready for me to add more strings into it.

Thanks in advance.

John Young
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top