Why does BinaryWriter prepend gibberish to the start of a stream? How do you avoid it?
问题 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,