创建文本文件并将数据写入其中 [英] Create text file and write data to it

查看:62
本文介绍了创建文本文件并将数据写入其中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建文本文件并向其写入数据。





例如:

emp1礼物



i想要在文本文件中写入文本,方法是在按下按钮时检查emp1是否存在于gridview中。





if(yes)

present

else

成功保存





我正在使用C#windowsform应用程序

任何人都可以帮我解决这个问题。





谢谢。

I want to create text file and write data to it.


eg:
emp1 A present

i want to write the text in a text file by checking emp1 is present/not in gridview when a button is pressed.


if(yes)
present
else
saved successfully


I am using C# windowsform Application
Can anyone help me to solve this problem.


Thanks.

推荐答案

看看这里:如何:写入文本文件(C#编程指南) [ ^ ]


参见File.IO [ ^ ]

http://support.microsoft.com/kb/304430 [ ^ ]

http:// www.tutorialspoint.com/csharp/csharp_file_io.htm [ ^ ]



-KR
See File.IO[^]
http://support.microsoft.com/kb/304430[^]
http://www.tutorialspoint.com/csharp/csharp_file_io.htm[^]

-KR


这篇关于创建文本文件并将数据写入其中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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