i am making application in c#. In that implication i have string which contain decimal value as
string number="12000";
The Hex equivalent of 12000 is 0x2EE0.
Here i want to assign that hex value to integer variable as
int temp=0x2EE0.
Please help me to convert that number.
Thanks in advance.
An int contains a number, not a representation of the number. 12000 is equivalent to 0x2ee0:
You can convert from the string “12000” to an int using int.Parse(). You can format an int as hex with int.ToString(“X”).