(.NET 4.8 / C# 7.3)
var test = new Dictionary<string, (int, string)> {
{ "a", (0, "A") }
, { "b", (1, "B") }
, { "c", (2, "C") }
};
test["c"].Item1 = 3;
The last line gives me CS1612: Cannot modify the return value of 'Dictionary<string, (int, string)>.this[string]' because it is not a variable
.
How do I modify a field in a tuple which is in a Dictionary<,> as an item value?