I'm trying to increment a value that's the value of a dictionary inside another dictionary and I just can't get it to work.
Dictionary<string, Dictionary<string, int>> logs = new Dictionary<string, Dictionary<string, int>>();
...
...
logs[username].Then(x => x.Value++) // If I use .Select(), the x represents a key value pair.
Unsurprisingly it doesn't work because .Then() doesn't exist in C# so how can I achieve what I'm trying to do?
EDIT: I tried doing
using System.Threading.Tasks;
Dictionary<string, Dictionary<string, int>> logs = new Dictionary<string, Dictionary<string, int>>();
...
...
logs[username].ContinueWith(x => x.Value++)
But it gives me the error that Dictionary<string, int> does not contain a definition for ContinueWith.