using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
Hashtable aa = new Hashtable();
private void buttonSave_Click(object sender, EventArgs e)
{
FileStream fs = new FileStream("e:\\400tel.dat", FileMode.Create);
BinaryFormatter bf = new BinaryFormatter();
bf.Serialize(fs, aa);
fs.Close();
}
private void buttonLoad_Click(object sender, EventArgs e)
{
aa.Clear();
FileStream fs = new FileStream("e:\\400tel.dat", FileMode.OpenOrCreate);
BinaryFormatter bf = new BinaryFormatter();
aa = (Hashtable)bf.Deserialize(fs);
fs.Close();
}
//Dictionary dic = new Dictionary(13000000);
C#连接mysql数据库
string ConnectionString = "server = localhost; user id = XXXX; password = XXXX; database = XXX