DictionarymyDict = new Dictionary (); myDict.Add("apple", 3); myDict.Add("banana", 5); myDict.Add("orange", 2);
int count = myDict["apple"];
bool exists = myDict.ContainsKey("kiwi");
foreach(KeyValuePairThe csharp IDictionary interface belongs to the System.Collections.Generic namespace.kvp in myDict) { Console.WriteLine("Key = {0}, Value = {1}", kvp.Key, kvp.Value); }