FileStream fs = new FileStream(path, FileMode.Open, FileAccess.WriteAccse); 好象是这么写 就是这个参数的模式改一下就好了
FileStream fs = new FileStream(path, FileMode.Append, FileAccess.Write)
还是 srd.append() 忘的差不多了...=.= hehe
StreamReader sr = new StreamReader(path); string content = sr.ReadToEnd(); content+="\n"+message; sr.Close(); StreamWriter sw = new StreamWriter(path,false); foreach(string s in result) sw.WriteLine(s); sw.Close();
好象是这么写 就是这个参数的模式改一下就好了
忘的差不多了...=.=
hehe
StreamReader sr = new StreamReader(path);
string content = sr.ReadToEnd();
content+="\n"+message;
sr.Close();
StreamWriter sw = new StreamWriter(path,false);
foreach(string s in result)
sw.WriteLine(s);
sw.Close();
今天问了三个问题全部解决太开心了!CSDN真不错!