| 
Differences between Hash table and Dictionary | ||
| 
Sno. | 
Dictionary | 
Hash table | 
| 
1 | 
It
  returns error if we try to find a key which does not exist. | 
It
  returns null if we try to find a key which does not exist. | 
| 
2 | 
It is
  faster than a Hashtable because there is no boxing and unboxing. | 
It is
  slower than dictionary because it requires boxing and unboxing. | 
| 
3 | 
Only
  public static members are thread safe. | 
All the
  members in a Hashtable are thread safe. | 
| 
4 | 
Dictionary
  is a generic type which means we can use it with any data type. | 
Hashtable
  is not a generic type. | 
Search This Blog
Tuesday, May 17, 2016
Differences between Hash table and Dictionary.
Subscribe to:
Post Comments
                                      (
                                      Atom
                                      )
                                    
 
 
No comments :
Post a Comment