I have been trying to make a test program, that writes a byte from a textbox to an offset in another textbox.
I have been trying to do that:
using (BinaryWriter bw = new BinaryWriter(File.OpenWrite(ofd.FileName)))
{
bw.Seek(toolStripTextBox1.Text, SeekOrigin.Begin);
bw.Write((byte)textBox1.Text);
}
toolStripTextBox1
contains the offset where I want to write and textBox1
contains the bytes I want to write.
Let's say I typed in the toolStripTextBox1
"0xF450B0"
and in textBox1
"1052"
, I wanted it to write the location at "0xF450B0"
to this: http://gyazo.com/49afd54dfc54fc15be47a7e08f300960