public void store(string filename) { StreamWriter finmusic = File.CreateText(filename); List<KeyValuePair<int, int>> history = new List<KeyValuePair<int, int>>(); history = this.gethistory(); for (int i = 0; i < history.Count(); i++) { finmusic.WriteLine(history[i].Key); finmusic.WriteLine(history[i].Value); } finmusic.Flush(); finmusic.Close(); }