Text File content output : Text File Read « File Directory « VB.Net






Text File content output

Text File content output
  
Imports System
Imports System.IO

Public Class MainClass

   Shared Sub Main()
         Dim fileName As String
         fileName = "test.vb"
         
            Try
               Dim stream As StreamReader
               stream = New StreamReader(fileName)
               Console.WriteLine( stream.ReadToEnd() )
            Catch exceptionCatch As IOException
               Console.WriteLine("FILE ERROR")
            End Try

   End Sub ' Main

End Class
 


           
         
    
  








Related examples in the same category

1.Read Text File ContentRead Text File Content
2.Open Text file and count the lines
3.Read Text File in a single StatementRead Text File in a single Statement
4.Read and Write Files
5.Read Text from a File
6.Read lines from a text file
7.Open text file to read
8.Read Text from a File
9.Read line by line from a text file
10.Read Text from a File with DO Until