how to modify a item in a dictionary when iterating in a foreach statement in c# code example
Example: c# modify dictionary in loop
List<string> keys = new List<string>(colStates.Keys);
foreach(string key in keys)
{
colStates[key] += 4;
}
List<string> keys = new List<string>(colStates.Keys);
foreach(string key in keys)
{
colStates[key] += 4;
}