I am using a StreamReader to read through a file. When I find the phrase I'm looking for, I then replace it with some other text. It is all appended to a string. I then close the StreamReader, and attempt to replace the file's contents with the new stirng using a streamwriter.
When I do
.
.
.
rdr.Close();
StreamWriter wr = new StreamWriter(FileName);
wr.Write(NewText);
wr.Close();
It errors on the StreamWriter saying the file is in use. You can see the Reader is closed.
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people