I need to replace a bit of text string in a hex file. I have already used a binary writer but as i add more stuff to the file, the offsets change. Therefore I have to keep fixing the offsets.
I have already tried the binary writer method.
BinaryWriter BinaryWriter1 = new BinaryWriter((Stream) File.OpenWrite("[File]"));
for (int index = [Offset]; index <= [Offset]; ++index) {
BinaryWriter1.BaseStream.Position = (long) index;
BinaryWriter1.Write([Name of form].Byte1);
BinaryWriter1.Close();
}