foreach (KeyValuePair<DateTime, string> kvp in dictionary) { //textBox3.Text += ("Key = {0}, Value = {1}", kvp.Key, kvp.Value); Console.WriteLine("Key = {0}, Value = {1}", kvp.Key, kvp.Value); }