I am trying to convert hex values from a textbox string (ie ffff) to 0xffff as a INT (This way I can use binary writer to write FFFF as 2 bytes in a file).
I actually used this:
string hextoconvert = Convert.ToInt32(textBox1.Text).ToString("X8");
(But again wasn't sure how to convert the string 0002045E to int 0x0002045E (as 4 bytes)). If that isn't the right idea then what should I use to convert hex values that the user puts in a textbox TO BYTES?