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
 
Back
Top