C#文本文件 - 如何写EOF字符 [英] C# text file - how to write EOF character

查看:124
本文介绍了C#文本文件 - 如何写EOF字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这一定是一个简单的问题,但我没有找到任何东西在那里。

This has got to be an easy question but I'm not finding anything out there.

我有一个文本文件中。我需要把一个EOF字符结尾让第三方厂商可以正确读取该文件。

I have a text file. I need to put a EOF character at the end so a third party vendor can read the file correctly.

什么是写文件的字符结束所需的转义字符?

What is the escape character needed to write the end of file character?

我不知道我是否需要提供任何更多的信息,但如果我这样做,让我知道。

I'm not sure if I need to supply any more information, but if I do, let me know.

感谢

推荐答案

只需使用的StreamWriter类和的关闭适当的文件。 EOF标记会妥善为您处理。

Just use the StreamWriter class, and Close the file appropriately. The EOF marker will be handled properly for you.

这篇关于C#文本文件 - 如何写EOF字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆