1. 程式人生 > >c# 檔案操作

c# 檔案操作

        FileStream fs = new FileStream("E:\\ak.txt", FileMode.Append);
        StreamWriter sw = new StreamWriter(fs);
        sw.WriteLine("time:"+OnGetMilTime()+ ",message:" + System.Text.Encoding.ASCII.GetString(message));
        sw.Flush();
        sw.Close();
        fs.Close();