I'm using .Net 2.0, and I've run into a strange error:
I have a hashtable using string as keys and a class (named Market) as the value. The class contains 4 integers and 1 byte. One of the integers represents a counter which I need to increment.
I have only one element in the hashtable. It's key is "Tomo"
.
I do this:
string strM = "Tomo"
Market mkt = (Market)mHash[strM];
mkt.nCounter++;
In the last line I get an null reference exception, even though using the debugger I can see that the hashtable contains that instance. This code was working fine a week ago.