I have the following foreach loop:
foreach (string variable in _variables.Keys)double fx = ObtieneValorParametro(variable, poliza, periodo);if (_variables[variable] == null)
_variables[variable] = fx;
Where _variables is of Dictionary<string, object> type.
The only modification to the collection I'm making is to change the value of an element from null to a value, as you see. I'm not removing nor adding elements, so, why I receive that error? I tried by using a traditional for loop, but since the collection is a Dictionary<string, object> collection I couldn't access the elements by mean of their indices.
View Complete Post