Streamwriter上的标题 [英] Title on Streamwriter
本文介绍了Streamwriter上的标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用streamwriter将数据保存到文本文件中。我已经知道如何使用streamwriter,但我想要的是如何在保存数据之前为我的文件添加标题...
文本文件中的Ex数据:
标题
123
123
123
123
123
123
我的文本文件应如下所示...
请帮忙..谢谢
I am trying to use streamwriter to save data to a text file. I already know how to use streamwriter but what I want is how to add a title to my file before saving the data...
Ex data on text file:
Title
123
123
123
123
123
123
My text file should look like this...
Please help.. thanks
推荐答案
您只需将文本写入文件即可。解决方案非常明显。打开流,写下你的标题文本,然后像以前一样写出你的数据。
有什么问题?
Your just writing text to a file. The solution is quite obvious. Open the stream, write your "title" text and then write your data as before.
What's the problem?
I已经解决了问题,谢谢。
I already solved the problems, thanks.
这篇关于Streamwriter上的标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文