c# how to edit a dictionary value code example
Example 1: how to change all values in dictionary c#
dict = dict.ToDictionary(kvp => kvp.Key, kvp => kvp.Value.Select(v => v.Nr));
Example 2: increase value in dictionary against a key in c#
public static void Increment<T>(this Dictionary<T, int> dictionary, T key)
{
int count;
dictionary.TryGetValue(key, out count);
dictionary[key] = count + 1;
}