how do i write to a overwrite a specific byte in a binary file? i looked around, but i couldn't figure it out.
i figured out how to write to the file, but it write it at the
beginning of the file, is there anyway to write it in the middle of the
file? or a specified location?
Loading
Mike GoldPosted Aug 15, 2007, 11:47 PM
I think you just need to open the file using the FileStream class for writing, set the Position property you want to write to, call
myFileStream.Position = 121;
or you can call Seek
Then to write to the file
myFileStream.Write(new byte[]{abyte}, 0, 1);