如何在VB.NET中创建文本文件 [英] How can I create a Text File In VB.NET

查看:122
本文介绍了如何在VB.NET中创建文本文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个创建文本文件



请帮助,我正在使用writeline,

传递文本框中的值和然后点击按钮点击获取文本文件。

喜欢在第一篇文章中输入文字Place:Work!



等等请帮助。

我的档案结构是

I have a to create a text File as

Please Help ,am using writeline ,
am passing the Values from Textboxes and then on button click getting the text file.
like in first text am entereing the text "Place:Work!"

and so on please Help .
the structure of my file is

<H>Place: Work!<R>12-12-2012!
<T>student=500L,Size=20L,marks=20R,Roll=40R!

推荐答案

使用 TextWriter Class [ ^ ]。
Use the TextWriter Class[^].


使用此



WriteAllText [ ^ ]



谢谢。
Use this

WriteAllText[^]

Thanks.


使用此...

Use this...
Dim fPath = "D:\Abc.txt"
Dim afile As New IO.StreamWriter(fPath, True)
afile.WriteLine("hello")
afile.Close()





快乐编码!

:)



Happy Coding!
:)


这篇关于如何在VB.NET中创建文本文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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