Hi

Can someone tell me how I can get the content of a text file to be printed into a windows console.
Each Line of the text file to be on its own console line.

It would be a lot of help.
I don't want to have to write a console.writeline for each line in the text file. Firstly, Thats tedious to do and secondly, it's going to make the size of my program massive and the coding incredibly untidy.

Something as simple as:

Dim sr As New StreamReader("PAthtofile")
While sr.Peek <> -1
    Console.Out.WriteLine(sr.ReadLine)
End While

Thank you so much!
Do you also know how to get it to work with files inside the resources of the project.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.