All the keys and corresponding items in our dictionary object:
Key Item
black #000000
red #FF0000
yellow #FFFF00
green #00FF00
aqua #00FFFF
blue #0000FF
fuschia #FF00FF
white #FFFFFF
Number of key/item pairs in our dictionary: 8
Does a "blue" key exist: True
Value of the item corresponding to the "blue" key: #0000FF
Changing the value of the "blue" key's item. Its value is now: #000099
Changing the value of the "blue" key to "dark blue".
All the keys and corresponding items in our dictionary object:
Key
Item
black
#000000
red
#FF0000
yellow
#FFFF00
green
#00FF00
aqua
#00FFFF
dark blue
#000099
fuschia
#FF00FF
white
#FFFFFF
This sample examines the functionality made available to developers via the
Dictionary object. You can think of the Dictionary as an indexed array.
Each piece of data stored in the Dictionary consists of two parts: a
key via which the entry is accessed and
a corresponding item which stores the
data.