写入:
StreamWriter s = new StreamWriter(address + "\Menu.ini", true); s.WriteLine("这里是具体的内容");//写入INI文件 s.Flush(); s.Close();
读取:
StreamReader sr = new StreamReader(address + "\Menu.ini"); string[] arrstr = sr.ReadToEnd().Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);