468,119 Members | 1,870 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,119 developers. It's quick & easy.

Hashtable vs. Dictionary.

What is the difference between a hashtable and a dictionary? Why isn't
Hashtable derived from DictionaryBase?
Nov 15 '05 #1
4 43582
The HashTable is the base class that is weakly type; the DictionaryBase
abstract class is stronly typed and uses internally a HashTable.

For more information, look here:
http://www.microsoft.com/belux/fr/ms...lections1.mspx

--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Peter Rilling" <pe***@nospam.rilling.net> schreef in bericht
news:uv**************@TK2MSFTNGP12.phx.gbl...
What is the difference between a hashtable and a dictionary? Why isn't
Hashtable derived from DictionaryBase?

Nov 15 '05 #2
So conceptually there is really not much of a difference, right?

"Jan Tielens" <ja*@no.spam.please.leadit.be> wrote in message
news:OB**************@tk2msftngp13.phx.gbl...
The HashTable is the base class that is weakly type; the DictionaryBase
abstract class is stronly typed and uses internally a HashTable.

For more information, look here:
http://www.microsoft.com/belux/fr/ms...ens/collection
s1.mspx
--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Peter Rilling" <pe***@nospam.rilling.net> schreef in bericht
news:uv**************@TK2MSFTNGP12.phx.gbl...
What is the difference between a hashtable and a dictionary? Why isn't
Hashtable derived from DictionaryBase?


Nov 15 '05 #3

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:e2**************@TK2MSFTNGP10.phx.gbl...
So conceptually there is really not much of a difference, right?

Just easier to work with. DictionaryBase is provided to make writing
strongly typed dictionaries easier, if you want to work with all
dictionaries you should use IDictionary as the base type.
"Jan Tielens" <ja*@no.spam.please.leadit.be> wrote in message
news:OB**************@tk2msftngp13.phx.gbl...
The HashTable is the base class that is weakly type; the DictionaryBase
abstract class is stronly typed and uses internally a HashTable.

For more information, look here:

http://www.microsoft.com/belux/fr/ms...ens/collection s1.mspx

--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Peter Rilling" <pe***@nospam.rilling.net> schreef in bericht
news:uv**************@TK2MSFTNGP12.phx.gbl...
What is the difference between a hashtable and a dictionary? Why isn't Hashtable derived from DictionaryBase?



Nov 15 '05 #4
You can work with a Hashtable out of the box, but to use the DictionaryBase
class you'll have to create a new class and inherit from the DictionaryBase
class.

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:e2**************@TK2MSFTNGP10.phx.gbl...
So conceptually there is really not much of a difference, right?

"Jan Tielens" <ja*@no.spam.please.leadit.be> wrote in message
news:OB**************@tk2msftngp13.phx.gbl...
The HashTable is the base class that is weakly type; the DictionaryBase
abstract class is stronly typed and uses internally a HashTable.

For more information, look here:

http://www.microsoft.com/belux/fr/ms...ens/collection s1.mspx

--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Peter Rilling" <pe***@nospam.rilling.net> schreef in bericht
news:uv**************@TK2MSFTNGP12.phx.gbl...
What is the difference between a hashtable and a dictionary? Why isn't Hashtable derived from DictionaryBase?



Nov 15 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Duncan Bayne | last post: by
12 posts views Thread by Marty | last post: by
2 posts views Thread by Ray Cassick \(Home\) | last post: by
3 posts views Thread by Anders Borum | last post: by
5 posts views Thread by Mark Rae | last post: by
8 posts views Thread by Martin Pöpping | last post: by
9 posts views Thread by raylopez99 | last post: by
15 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.