What is the difference between a Hash Table and a Dictionary?

Answer Posted / hrindows@gmail.com

The main differences are listed below.

Dictionary:
Returns an error if the key does not exist
No boxing and unboxing
Faster than a Hash table

Hashtable:
Returns NULL even if the key does not exist
Requires boxing and unboxing
Slower than a Dictionary

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which dll is required to translate xml to sql in internet information server (iis)?

535


How anonymous method is different from a lambda expression?

531


What is heap and what is stack?

575


How we can achieve Connection pooling in .Net?

645


Explain me what is an anonymous method and how is it different from a lambda expression?

539






What is the difference between imperative and interrogative code?

1589


What is .net debug & trace?

625


Why do we use msmq?

601


Explain how to spawn a thread?

541


What is the new three features of COM+ services, which are not there in COM (MTS)

1540


Explain me what is a design pattern and what is it for?

579


What is implement a generic action in webapi?

725


What is the difference between a class and an object, and how do these terms relate to each other?

591


Differences between namespace, class, assembly?

591


If you are executing these statements in commandobject. Select * from table1; select * from table2? How you will deal result set? 42. How do you sort a dataset.

540