C#:Read a Text File
Read Text File
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.