This example code shows how you can use the StreamReader class to read an write standard text files. The code below can be used as a basis for reading lines from one file, processing them and then writing them back out to another file.
I have used this code as a base for processing CSV, HTML and XML files.