Hi all,
has anyone any idea why I get an InvalidOperationException in this case?
Dictionary<char, bool> dict = new Dictionary<char, bool>(6);
dict.Add('A', false);
dict.Add('B', false);
dict.Add('C', true);
// this works
dict['A'] = true;
// foreach gives an InvalidOperationException
foreach (KeyValuePair<char, bool> KV in dict)
{
dict[KV.Key] = true;
}