Hashtable vs. Dictionary.

  • Thread starter Thread starter Peter Rilling
  • Start date Start date
P

Peter Rilling

What is the difference between a hashtable and a dictionary? Why isn't
Hashtable derived from DictionaryBase?
 
Peter Rilling said:
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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top