-
HEX values
Does anyone know how to convert integer values to hex values in C#. It is really easy to do in VB but I am not seeing a way in the documentation on how to do it in C#. I would really hate to have to write a class in VB just to use in C#.
Thanks
Jeremy
-
Sure..
Code:
myNumber.ToString("X");
Could it get any easier?? ;)
-
-
-
The funny part is I know how to get from hex, I just couldn't get there. So here is the answer to your question.
PHP Code:
System.Windows.Forms.MessageBox.Show(Convert.ToInt16("ABC",16).ToString());
Jeremy
-
Quote:
PHP Code:
System.Windows.Forms.MessageBox.Show(Convert.ToInt16("ABC",16).ToString());
I use this
PHP Code:
MyNumber = Int64.Parse(Value, Globalization.NumberStyles.AllowHexSpecifier)
What's the difference (better/worse)?