Thennarasu N
What is the difference between Hashtable and Dictionary?
By Thennarasu N in .NET on Oct 22 2016
  • Thennarasu N
    Oct, 2016 22

    Hashtable and Dictionary are collection of data structures to hold data as key-value pairs. Dictionary is generic type, hash table is not a generic type. The Hashtable is a weakly typed data structure, so you can add keys and values of any Object Type to the Hashtable. The Dictionary class is a strongly types < T Key, T Value > and you must specify the data types for both the key and value.C# DeclarationHashtable numbers = new Hashtable(); Dictionary dictionary = new Dictionary();

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS