c# TXT文件读写

  
    
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

你可能感兴趣的:(文件读写)