C
Calvin Lai
Hi all,
I have the following code which should work. However, an exception (
InvalidOperationException) was thrown which doesn't make sense to me.
line 1: foreach (string name in _fieldMaps.Keys)
line 2: _fieldMaps[name] = 1;
where _fieldMaps is a hashtable containing (string, int) pairs internally.
Does anyone know why this exception is thrown? I tried debug it and found
the exception was thrown during the 2nd loop.
i.e. execution steps:
line1, line2, line1, EXCEPTION.
Thanks for any inputs here.
-Cal
I have the following code which should work. However, an exception (
InvalidOperationException) was thrown which doesn't make sense to me.
line 1: foreach (string name in _fieldMaps.Keys)
line 2: _fieldMaps[name] = 1;
where _fieldMaps is a hashtable containing (string, int) pairs internally.
Does anyone know why this exception is thrown? I tried debug it and found
the exception was thrown during the 2nd loop.
i.e. execution steps:
line1, line2, line1, EXCEPTION.
Thanks for any inputs here.
-Cal