Hi All,
Battling away I need to display a binary from a string "4020",
I have used the method
MessageBox.Show(Returned);
Hexvalue2 = Convert.ToUInt32(Returned, 16);
MessageBox.Show(Hexvalue2.ToString());
to convert my string to a form that can be used that with
if ((Hexvalue2 & 0x0001) == 0)
{
checkBox1.Checked = false;
label9.Text = "False";
}
else
{
checkBox1.Checked = true;
label9.Text = "True";
}
to check if bits are set and update a string accordingly This appears to working fine but bits 4 & 32 seem to inverted I was hoping for a look at the binary data before yelling fowl to higher ups! So I did the following
Hexvalue2 = Convert.ToUInt32(IU_status,2);
textBox2.Text = Hexvalue2.ToString();
and get an Could not find any recognizable digits error. Is the correct way of doing what I'm after or have I been seduced by Convert.To again?
Glenn