Read Text File Content : Text File Read « File Directory « VB.Net






Read Text File Content

Read Text File Content
  
Imports System.IO

Module Module1

    Sub Main()
        Dim TextFile As New StreamReader("test.txt")

        Dim Content As String

        Do
            Content = TextFile.ReadLine()

            If (Content <> Nothing) Then
                Console.WriteLine(Content)
            End If
        Loop While (Content <> Nothing)

        TextFile.Close()
    End Sub

End Module


           
         
    
  








Related examples in the same category

1.Open Text file and count the lines
2.Read Text File in a single StatementRead Text File in a single Statement
3.Text File content outputText File content output
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