May 2010
Intermediate to advanced
1272 pages
61h 18m
English
HashTable CollectionThe System.Collections.HashTable collection can store items according to a key/value pair, where both key and value are of type Object. The HashTable peculiarity is that its items are organized based on the hash code of the key. The following code provides an example:

Items within a HashTable can be accessed by the key, as shown in the last line of code in the preceding example. It also offers two methods named ContainsKey and ContainsValue that enable checking if a key or a value exists within the collection, as demonstrated here:
Note that if you do not check if a key already exist, as in the preceding example, and ...
Read now
Unlock full access