将字符串写入文本文件的最佳方法是什么? [英] What is the best way to write strings to a text file?
本文介绍了将字符串写入文本文件的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
请帮助我.
我的要求是将字符串数据写入文本文件.这样做的最佳方法是什么.有很多方法可以做到,但是我不确定该使用哪种方法?请帮忙.
Hello all,
Kindly help me with this.
My requirement is to write string data to a text file. What is the best method to do that.there are many ways to do it but i am not sure which one to use ? please help.
推荐答案
您应该使用StreamWriter
编写文本.
检查一下.
http://msdn.microsoft.com/en-us/library/6ka1wd3w.aspx [ ^ ]
You should useStreamWriter
for writing text.
Check this.
http://msdn.microsoft.com/en-us/library/6ka1wd3w.aspx[^]
这篇关于将字符串写入文本文件的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文