using System; using System.Collections.Generic; using System.Collections; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Hashtable hash = new Hashtable(); hash.Add("A", new Hashtable()); ((Hashtable)hash["A"]).Add("A", 1); ((Hashtable)hash["A"]).Add("B", 2); hash.Add("B", new Hashtable()); ((Hashtable)hash["B"]).Add("A", 4); ((Hashtable)hash["B"]).Add("B", 8); foreach (string k in ((Hashtable) hash["B"]).Keys) { Console.WriteLine(k + " - " + ((Hashtable) hash["B"])[k]); } } } }