How to read .txt files in vb.net ?

Ranjeet_8
Posted by Ranjeet_8 under VB.NET category on | Points: 40 | Views : 1816
Read .txt file

Dim fileContents As String = String.Empty
Dim fPath As String = "D:\Ftest.txt"
Dim Sr As System.IO.StreamReader = System.IO.File.OpenText(fPath)
fileContents = Sr.ReadToEnd()
Sr.Close()

Comments or Responses

Login to post response