c# loop through dictionary keys and modify each code example
Example 1: c# dictionary loop key value
foreach(KeyValuePair<string, string> entry in myDictionary)
{
// do something with entry.Value or entry.Key
}
Example 2: c# modify dictionary in loop
List<string> keys = new List<string>(colStates.Keys);
foreach(string key in keys)
{
colStates[key] += 4;
}