If you get a read only error, then your parameter is either incorrect, the file is used by another program or another file handle in your own program.
If you reuse a StreamWriter remember to call Close() on it to release the current file before you use it on another file.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.