string dir = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); //系統路徑
string path = dir + "\\autoPlan.ini";
if (File.Exists(path))
{
StreamReader sr = new StreamReader(File.OpenRead(path));
while ((data = sr.ReadLine()) != "")
{
//.....
}
}
============================================================
StreamWriter sw = new StreamWriter(File.OpenWrite(path));
sw.WriteLine("Something");
sw.Close();
沒有留言:
張貼留言