The Hashtable class represents a collection ofkey-and-value pairsthat are organized based on the hash code of the key. It uses the key to access the elements in the collection.
A hash table is used when you need to access elements by usingkey, and you can identify a useful key value. Each item in the hash table has a key/value pair. The key is used to access the items in the collection.
using System; using System.Collections;
namespace CollectionsApplication { class Program { static void Main(string[] args) { Hashtable ht = new Hashtable();
Anonymous User
23-Nov-2015The Hashtable class represents a collection of key-and-value pairs that are organized based on the hash code of the key. It uses the key to access the elements in the collection.
A hash table is used when you need to access elements by using key, and you can identify a useful key value. Each item in the hash table has a key/value pair. The key is used to access the items in the collection.