This seems to come up every so often, so thought I would add it here so people can have a look if they search the site.
Reading and writing to a text file is a very basic thing in C#, most of us have to do it from very early on and several times later. It's not exactly secure (as you can obviously just open it) so shouldn't be used for passwords or user details.
I will also provide code for reading specific lines in an array of text.