Jump to content
  • Advertisement
Sign in to follow this  
Daniel Miller

[.net] Hashtable

This topic is 4865 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Is it "safe" to use out-of-the-box strings in a hashtable? I ask this because I remember reading on MSDN that the default hashing method does not return unique hashes.

Share this post


Link to post
Share on other sites
Advertisement
Scratch that, the second version of the framework doesn't seem to have a generic version. I guess it's back to sorted list.

edit: dictionary is better for this

[Edited by - Daniel Miller on July 21, 2005 5:07:40 PM]

Share this post


Link to post
Share on other sites
Hey Dan - what sort of help do you have there? The beta 2 SDK installed with VS 2005 from a CD my dad got from a BCS (British Computer Society) meeting does not have any help! I've had to set the help to online help but that doesn't help at all - looks more like placeholder pages. (M$ might still be writing it...) If that's wrong can you give a link?

The Beta 1 seemed to have good help though.

Share this post


Link to post
Share on other sites
What's the difference between a Hashtable and a Dictionary? They seem to do the same thing, except maybe with subtly different implementations.

Share this post


Link to post
Share on other sites
Quote:
Original post by Holy Fuzz
What's the difference between a Hashtable and a Dictionary? They seem to do the same thing, except maybe with subtly different implementations.

Which Dictionary? IDictionary is the interface defined for all of the data structures that use key-value pairs, but the underlying implementation isn't definded by that. For example, the Hashtable is literally an implementation of a hash table, where keys are fed to a hash function that stores each value in a certain index of an array. On the other hand you can have a SortedList, which I believe is a linked list implementation (but that is only a guess). There are also HybridDictionary's, which use two different techniques based on the current load. As far as Dictionary goes, there are lots of options.

Share this post


Link to post
Share on other sites
Quote:
Original post by Daniel Miller
I'm using MSDN online... I don't have the page, but search for it on google (I remember it being hard to find from within MSDN).

Sorry to interrupt the thread again, but I thought I'd be kind and provide the link.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!