Tuesday, May 21, 2013

Read VIsual basic Text LIne by line tutorials

VIsual Basic.net Read Text Line by Line Quick Method
  1. Imports System.IO
  2. Module Module1
  3. Sub Main(ByVal args As String())
  4. Dim fileIn As New StreamReader(args(0))
  5. Dim strData As String = ""
  6. Dim lngCount As Long = 1
  7. While (Not (fileIn.EndOfStream))
  8. strData = fileIn.ReadLine()
  9. Console.WriteLine(lngCount & ": " & strData)
  10. lngCount = lngCount + 1
  11. End While
  12. End Sub
  13. End Module

No comments:

Post a Comment