logo CodeStepByStep logo

RemoveAll

Language/Type: C# List collections
Related Links:

Write a method named RemoveAll that accepts as a parameter a List of strings along with an element value string, and modifies the list to remove all occurrences of that string. For example, if the list v contains {"a", "b", "c", "b", "b", "a", "b"}, the call of RemoveAll(v, "b"); should modify it to store {"a", "c", "a"}.

Method: Write a C# method as described, not a complete program or class.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.