使用C#编辑记事本数据 [英] Edit notepad data with c#

查看:110
本文介绍了使用C#编辑记事本数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要修改记事本;那没什么大不了的.
当我自动保存数据时,那边会有多余的空间.
文本框数据非常区分大小写;实际上会保存服务器名称,因此多余的空间会妨碍连接.

任何建议...
在此先感谢

I want to modify a notepad; and that is not a big deal.
When i save the data automatically an extra space over there.
Textbox data is very case sensitive; actually it saves server name so an extra space will hamper in the connection.

Any suggetion...
Thanks in advance

推荐答案

现在您正在做的是一行一行地编写.
默认情况下,在写完每一行后,它将生成一个新行.因此,更好的主意是给我们writer.write("your text")而不是writer.writeline("your text").
Now you are doing is writing line by line.
Which will generate a new line after writing each line by default. So the better idea is to us writer.write("your text") instead of writer.writeline("your text").


这篇关于使用C#编辑记事本数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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