Hi
I have a Program that reads a charactor from a text box and replaces a specific byte in a hex file. when the text box is empty the specific byte needs to be 0x20 but for somreason I can't get that to work.
stream.Position = 0x118d5;
byte[] LogoDataBy0 = { 0x00 };
if (string.IsNullOrWhiteSpace(textBox12.Text))
{
LogoDataBy0[0] = 0x20;
}
else
{
LogoDataBy0 = ASCIIEncoding.ASCII.GetBytes(textBox12.Text);
}
stream.WriteByte(LogoDataBy0[0]);
This works for the empty textbox but for some reason now won't write the charactor if I fill the Textbox.
Any help would be greatly appreciated.
Alert for thread