01.using System.IO;
02.using System.Runtime.Serialization.Formatters.Binary;
03.....
04....
05.
06.Hashtable aa = new Hashtable();
07.
08.private void buttonSave_Click(object sender, EventArgs e)
09.{
10. FileStream fs = new FileStream("e:\\aa.dat", FileMode.Create);
11. BinaryFormatter bf = new BinaryFormatter();
12. bf.Serialize(fs, aa);
13. fs.Close();
14.}
15.
16.private void buttonLoad_Click(object sender, EventArgs e)
17.{
18. aa.Clear();
19. FileStream fs = new FileStream("e:\\aa.dat", FileMode.OpenOrCreate);
20. BinaryFormatter bf = new BinaryFormatter();
21. aa = (Hashtable)bf.Deserialize(fs);
22. fs.Close();
23.}