C#:Read a Text File
Jump to navigation Jump to search
You can open a text file and read each line.
StreamReaderrepresents a text file that can process one
line at a time.
- We use the
ReadLinemethod to obtain a single line of text.
- When the file has been exhausted the string returned will be
The text file http://progzoo.net/haggis.txt includes some lines of text.