Posted By

indra on 08/24/10


Tagged


Versions (?)

Reading and Writing textfile


 / Published in: VB.NET
 

Simple function to read and write file from vb.net

  1. Dim sr As New StreamReader("c:\TESINPUT.TXT")
  2. Dim ws As New StreamWriter("c:\TESTOUTPUT.TXT", False)
  3.  
  4. Do While sr.Peek <> -1
  5. ws.WriteLine(sr.ReadLine())
  6. Loop
  7.  
  8. sr.Close()
  9. ws.Close()

Report this snippet  

You need to login to post a comment.