May 2010
Intermediate to advanced
1272 pages
61h 18m
English
Dictionary(Of TKey, TValue) CollectionThe System.Collections.Generic.Dictionary(Of TKey, TValue) collection is the generic counterpart for the HashTable. Each item within a Dictionary is a key/value pair; therefore, the constructor requires two arguments (TKey and TValue) where the first one is the key and the second one is the value. The following code shows instantiating a Dictionary(Of String, Integer) in which the String argument contains a person’s name and the Integer argument contains the person’s age:

A single item in the collection is of type KeyValuePair(Of TKey, TValue) and both arguments reflect the collection’s ones. For a better ...
Read now
Unlock full access