1
读:TextBox1.
Text
=
File
.ReadAllText("d:
/
b.txt",Encoding.
Default
);
2
写:
File
.WriteAllText("d:
/
a.txt", TextBox1.
Text
, Encoding.
Default
);
3
追加:
File
.AppendAllText("d:
/
a.txt", TextBox1.
Text
, Encoding.
Default
);
想用C#写个Windows Service,中间遇到的一些好玩方便的东西,拿来主义。
感谢一下链接:
http://topic.csdn.net/u/20080402/18/3ebfd0ed-0803-4ff3-bebf-df4ac13adad2.html
转载于:https://www.cnblogs.com/litstrong/archive/2010/04/03/1703907.html
相关资源:C# 控制台读写txt文件代码