Mega Code Archive

 
Categories / VB.Net Tutorial / Stream File
 

Read text file to the end

Imports System.IO Public Class Tester     Public Shared Sub Main                  Try                Dim stream As StreamReader                stream = New StreamReader("test.vb")                Console.WriteLine(stream.ReadToEnd())             Catch exceptionCatch As IOException                Console.WriteLine("FILE ERROR")             End Try     End Sub End Class