Hash tables
I normally use hashtables with square brackets because you can pack data easier than with the .add() method.
-
Hashtable items= new Hashtable();
-
-
items["item1"] = 87;
-
items["item2"] = "a string";
-
items["item3"] = 64;
-
items["item4"] = 79;
-
-
foreach (DictionaryEntry item in items)
-
{
-
listBox1.Items.Add("item key: " + item.Key + " , item value: " + item.Value);
-
}