What is the difference between dictionary and hashtable in c#?



What is the difference between dictionary and hashtable in c#?..

Answer / Swatantra Gupta

Dictionary and Hashtable are both collection classes that store key-value pairs. Dictionary is newer, faster, more flexible, and allows for null keys while Hashtable is slower but can handle non-generic types and does not allow null keys.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Why delegates are required?

1 Answers  


What is getenumerator?

1 Answers  


What do you mean by delegates and explain different types of delegates?

1 Answers  


Does a class need a constructor c#?

1 Answers  


Is it possible to have different access modifiers on the get/set methods of a property in c#?

1 Answers  


What is object type in c#?

1 Answers  


What is an argument in c#?

1 Answers  


What is use of super class

4 Answers   NIIT,


What is the use of return in c#?

1 Answers  


What are sorted lists?

1 Answers  


What is thread safe in c#?

1 Answers  


What do you mean by streamreader/streamwriter class in c#?

1 Answers  


Categories