Dim oFile As System.IO.File
Dim oWrite As System.IO.StreamWriter
oWrite = oFile.CreateText(“C:sample.txt”)
oWrite.WriteLine(“Write a line to the file”)
oWrite.WriteLine()
oWrite.Close()
write text file in vb.net
July 17, 2006 by ashraf
July 17, 2006 by ashraf
Dim oFile As System.IO.File
Dim oWrite As System.IO.StreamWriter
oWrite = oFile.CreateText(“C:sample.txt”)
oWrite.WriteLine(“Write a line to the file”)
oWrite.WriteLine()
oWrite.Close()
hello Rahaman sir
i m Rana kajal H.
i am doing my diploma in computer engg and we are doing project on lease management. I wanted to know how to create a text file using VB.Net. As we enter the data and save it ,then before entering it into the database a text file should be created.
Hoping for your reply soon.
Hello,
Here is a similar program,
http://www.freevbcode.com/ShowCode.Asp?ID=4492
And here you can get some operation that can be performed while working on text file with VB.
http://www.astahost.com/info.php/text-file-operations-vbnet_t6372.html