BinaryReader and BinaryWriter api behaviour incompatibility - C#