RemoveAll Dictionary Extension Method
- by João Angelo
Removing from a dictionary all the elements where the keys satisfy a set of conditions is something I needed to do more than once so I implemented it as an extension method to the IDictionary<TKey, TValue> interface.
Here’s the code:
public static class DictionaryExtensions
{
/// <summary>
/// Removes all the elements where the…