1
Reply

Hash Table

jayasri

jayasri

10y
905
0
Reply

    Hashtable is useful when you need to store data in a key and value pair Stored in two dimensional array and have a link format of Key and Value. The Hashtable object contains items in key/value pairs. The keys are used as indexes. The data type of Hashtable is object and the default size of a Hashtable is 16. - Creating a Hashtable The Hashtable class in C# represents a hashtable. The following code creates a Hashtable: private Hashtable hshTable = new Hashtable(); Adding Items to a Hashtable Add method of Hashtable is used to add items to the hashtable. The method has index and value parameters. The following code adds three items to hashtable. hshTable .Add("Author1", "Ravi");