Is it necessary to call the close method for every BinaryWriter that I
create? Or is it just a way to close the underlying stream? For example is it
OK to do the following:
private void WriteUnicodeStringToStream (Stream s, string string)
{
BinaryWriter bw = new BinaryWriter (s, Encoding.Unicode);
bw.Write (string);
}
As you can see, I don't close the BinaryWriter since I haven't necessarily
done the stream. Is it OK to do this?
As far as I can see, the Close method for a BinaryWriter doesn't do anything
than close the stream, so I assume it is safe... right?