I'm debugging some issues with writing pieces of an object to a file and I've gotten down to the base case of just opening the file and writing "TEST" in it. I'm doing this by something like:
static FileStream fs;
static BinaryWriter w;
fs = new FileStream(filename, FileMode.Create);
w = new BinaryWriter(fs);
w.Write("test");
w.Close();
fs.Close();
Unfortunately, this ends up prepending a box to the front of the file and it looks like so:
TEST, with a fun box on the front. Why is this, and how can I avoid it?
Edit: It does not seem to be displaying the box here, but it's the unicode character that looks like gibberish.