using System.Collections.Generic; Dictionarydict = new Dictionary (); dict.Add("John", 25); dict.Add("Jane", 30); dict.Add("Bob", 40); Console.WriteLine(dict["John"]); // Output: 25
using System.Linq; foreach (var key in dict.Keys) { Console.WriteLine(key); }The package or library used for this class is `System.Collections.Generic`.