Answers for "dictionary c# item increase value"

C#
0

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;
    }
Posted by: Guest on February-25-2021

Code answers related to "dictionary c# item increase value"

C# Answers by Framework

Browse Popular Code Answers by Language