How to store a HashTable in the usersettings?
问题 In .NET you can select a hashtable as type for a usersetting. However when I save it and retrieve it in this way, it doesnt seem to have saved it at all. Hashtable t = new Hashtable(); t.Add(1,"Foo"); t.Add(2,"Bar"); Properties.Settings.Default.Setting = t; Properties.Settings.Default.Save(); if(Properties.Settings.Default.Setting != null) foreach (DictionaryEntry entry in Properties.Settings.Default.Setting) { MessageBox.Show(entry.Key + " " + entry.Value); } Why doesnt it serialize it in