Hi,

I'm having some really, really bizarre problems since starting out with C# and .NET (C++ containers seem so much simpler!).

First, I have a class, Nodemaster, with a couple fields, long streamPosition, and long streamLength.

Next I have a static Hashtable, which stores instances of the Nodemaster class as the values.

When I load up a small amount of data (an incomplete subset), and run my app (about 20,000 nodes generated maybe?), everything works properly, and the fields are intact.

However, once I load up a large amount of data, approx 120,000 nodes are generated (it's a big tree structure), and for every single node that is referenced, the fields streamPosition and streamLength are mysteriously set to 0.

I figure this might have to do with the Hashtable, but I'm not sure. I figured that perhaps it is when the Hashtable is resized, and the table has to be completely rehashed, so I created the Hashtable with an initial capacity of 200,000 in an attempt to avoid resizing the hashtable, but still the same behaviour is occuring.

I'm not sure exactly why this is happening, nor how I can circumvent it. If the nodes are being cloned in some way, is it safe to assume that Object's default implementation would not restore the private fields properly? And if that is the case, how would I fix it?

TIA.

Jonathan Roewen