#fix
https://proglib.io/w/c8e37e70
What changed in .net 5 that makes it not throw when changing dictionary values in foreach
https://proglib.io/w/c8e37e70
Stack Overflow
What changed in .net 5 that makes it not throw when changing dictionary values in foreach
In .NET<5 and .NET Core 3.1 the following code
var d = new Dictionary<string, int> { { "a", 0 }, { "b", 0 }, { "c", 0 } };
foreach (var k in d.Keys)
{
d[k...
var d = new Dictionary<string, int> { { "a", 0 }, { "b", 0 }, { "c", 0 } };
foreach (var k in d.Keys)
{
d[k...