Simple .txt files have no nice features like formatting or password protection. You will need to wrap the file into a different format that does support password protection, and also use a program that understands it to read them again.
I've tried out AxCrypt once and it can do what you want. If you want to program this yourself, for the encryption you should check out CipherOutputStream for writing and CipherInputStream for reading.
Why didn't you state up front that you were talking about ZIP files? Password protection is not a feature of the standard ZIP format, making it unlikely that the class libraries will ever have it.