Possible Duplicate:
How do I convert hex string into signed integer?
example:"3A" convert to 0x3A,thanks a lot!
X = hex2num( hexStr ) converts hexStr to the double-precision floating-point number that it represents. The input argument hexStr has up to 16 characters representing a number in its IEEE® format using hexadecimal digits.
Hexadecimal Number String. The “Hexadecimal” or simply “Hex” numbering system uses the Base of 16 system and are a popular choice for representing long binary values because their format is quite compact and much easier to understand compared to the long binary strings of 1's and 0's.
To represent Int32 as a Hexadecimal string in C#, use the ToString() method and set the base as the ToString() method's second parameter i.e. 16 for Hexadecimal. Int32 represents a 32-bit signed integer.
Convert.ToInt32("3A", 16)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With