Saturday 5 November 2016

Dictionary Vs HashTable

Dictionary

It returns error if we try to find a key which does not exist.

It is faster than Hashtable , because there is no Boxing and UnBoxing.

Dictionary is generic type, which means we can use it with any data ype.

Only public static members are thread safe.  (?..)


HashTable

It return NULL if we try to find out a key which does not exist.

It is slower than Dictionary , because it requires Boxing and UnBoxing.

Hashtable is not generic type.

All the members in Hashtable are thread Safe.









Hope this information  helpful to you. Thank you for taking time to look at my blog. ----- Syed Sadiq Ali.      







No comments: