[API Proposal]: Add RemoveWhere to all relevant collections
Open
api-suggestion
area-System.Collections
- Dominant language
- C#
- Stars
- 18.3k
- Forks
- 5.6k
- PR merge metrics
- PR metrics pending
Description
### Background and motivation
Please add 'RemoveWhere' to all relevant collections. RemoveWhare is extremely useful when doing clean up than iterating and removing, which also is very problematic using 'foreach'.
### API Proposal
```csharp
namespace System.Collections.Generic;
public class ICollection : .........
{
...
public int RemoveWhere (Predicate match)
...
}
```
### API Usage
```csharp
var list = new List();
list.RemoveWhere (x => x.Status == "Dead");
```
### Alternative Designs
_No response_
### Risks
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.