hashtable

  • Thread starter Thread starter nevin
  • Start date Start date
N

nevin

Is it possible to have a Hashtable contain another Hashtable as a value
object?
thanks
Nev
 
hehehe... I even opened a Reply To window to ask that... then cancelled it.

Telmo Sampaio
 
of course :)

it adds the 2nd hashtable fine as the first element of the primary hashtable
and you can add regular objects to it fine and reference them (although the
number of enclosing brakcets starts to get confusing). Adding a second
hashtable to the primary doesn't raise an exception but it just gets
ignored, so I was wondering what I was doing incorrectly. It seems you can
do it but only partially..at least in my case.
 
nevin said:
of course :)

it adds the 2nd hashtable fine as the first element of the primary hashtable
and you can add regular objects to it fine and reference them (although the
number of enclosing brakcets starts to get confusing). Adding a second
hashtable to the primary doesn't raise an exception but it just gets
ignored, so I was wondering what I was doing incorrectly. It seems you can
do it but only partially..at least in my case.

Could you post a short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.

It should work just fine.
 
ok, well if it should work then obviously I'm being a dummy and need to look
at my code more closely.

Thanks for your input.
Nev
 
Back
Top