I have 3 text boxes. The user will enter hex numbers in textBox1 and textBox2. I want to add them together and display the HEX sum in textBox3.
This code ALMOST works. It displays the answer in DECIMAL. How can I display it in HEX Thanks.
int mynum1;
int mynum2;
int myanswer;
mynum1 = Int32.Parse(textBox1.Text, System.Globalization.NumberStyles.HexNumber);
mynum2 = Int32.Parse(textBox2.Text, System.Globalization.NumberStyles.HexNumber);
myanswer = mynum1 + mynum2;
textBox3.Text = myanswer.ToString(); //this displays in Decimal. How to Display in hex
Visual C#5
|