0

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.

2
Contributors
3
Replies
12
Views
4 Years
Discussion Span
Last Post by Begginnerdev
0

Something as simple as:

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

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

Edited by Stealthbird97

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.