标签:stream void 日志 win log write 清空 string winform
private void textLog_TextChanged(object sender, EventArgs e)
{
FileStream fs = new FileStream(@"C:\\文件导入记录日志.txt", FileMode.Open);
StreamReader Reader = new StreamReader(fs);
string strLine = Reader.ReadLine();
while (strLine!=null && strLine!="")
{
strLine = Reader.ReadLine();
}
StreamWriter sw = new StreamWriter(fs);
sw.WriteLine(strLine+textLog.Text);
sw.Flush();
sw.Close();
fs.Close();
}
标签:stream void 日志 win log write 清空 string winform
原文地址:http://www.cnblogs.com/W--Jing/p/7115868.html