What is the main difference between hash table and Dictionary?

Answer Posted / sunil kumar

Dictionary is a generic type, Hashtable is not. Now what that
means.You get type safety with Dictionary, because you can't
insert any random object into it, and you don't have to cast
the values you take out.
And also generic collections are a lot faster as there's no
boxing/unboxing
Again Hashtable also have to box/unbox, which may have memory
consumption as well as performance penalties.

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference Between Authentication and authorization?

576


What is the difference between a cookie and a pixel?

484


What is the use of HttpHandlers? When to use this?

630


To load your generated dataset with data which method do you invoke?

609


In order to get assembly info which namespace we should import?

528






Distinguish between Server-side and Client-side code?

554


How to implement role based security in asp.net mvc? : Asp.Net MVC

437


3. What goals do you have in your career?

1424


What is view state and how it works in asp net?

552


What is the default Orientation property in a Menu control?

538


Explain weak typing and strong typing.

565


What is a windows service?

560


Please brief not about xsd,xslt & xml?

546


What is a pixel url?

514


What is asp.net with mvc? : Asp.Net MVC

522