Hashtables

  • Thread starter Thread starter Brandon Owensby
  • Start date Start date
Brandon Owensby said:
I'm not planning on storing it anywhere. I just wanna be able to take a
class....that is base on instance....not value and use is as a key to a
hashtable. In otherwords...as an example:


Form form = ???;

Hashtable hashtable = new Hashtable();

hashtable.Add(form, somevalue);

somevalueholder = hashtable[form];

I have done this without problem....but my supervisor was concerned it
wouldn't always work. I am seeming to understand that that is fine. The
key doesn't have to be instance based.

Well, I don't know what you mean by "that is base on instance" but the
above will be fine.
 
Thanks alot....and to clarify...what I meant by "base on instance" which
should of read "based on instance" is that something that isnt' based on the
value of the object such as int or decimal but by the instance of the
object. for a form is never equal to a form based on values...only on
instance.

Thanks again for all your help.

Brandon Owensby


PS - Is this information based only on Everret or does it apply to VS 2003
C# .Net 1.1 as well?
 
Brandon Owensby said:
Thanks alot....and to clarify...what I meant by "base on instance" which
should of read "based on instance" is that something that isnt' based on the
value of the object such as int or decimal but by the instance of the
object. for a form is never equal to a form based on values...only on
instance.

Thanks again for all your help.

Brandon Owensby


PS - Is this information based only on Everret or does it apply to VS 2003
C# .Net 1.1 as well?

Everett *is* VS.NET 2003/.NET 1.1. However, I think it'll be safe to
rely on this behaviour forever.
 
Back
Top