RosettaCodeData/Task/Read-entire-file/Visual-Basic-.NET/read-entire-file.visual

17 lines
305 B
Plaintext

Imports System.IO
Public Class Form1
' Read all of the lines of a file.
' Function assumes that the file exists.
Private Sub ReadLines(ByVal FileName As String)
Dim oReader As New StreamReader(FileName)
Dim sLine As String = oReader.ReadToEnd()
oReader.Close()
End Sub
End Class