I have a Dictionary.
Dictionary
I need to look within that dictionary to see if a value exists based on input from somewhere else and if it e
Here is a method you can use:
public static void RemoveAllByValue(this Dictionary dictionary, V value) { foreach (var key in dictionary.Where( kvp => EqualityComparer.Default.Equals(kvp.Value, value)). Select(x => x.Key).ToArray()) dictionary.Remove(key); }