wyrd
Senior Contributor
How can I parse a hex string into an integer value?
Example.
You can this for hex values:
int i = 0x00112233;
But this throws an error:
string str = "0x00112233";
int i = int.Parse(str);
Any ideas? Thanks in advance.
Update:
I've tried using \x00112233 instead, and also (int) and Convert.ToInt32 for conversions (for both type of string values). Nothing has yet to work.
Example.
You can this for hex values:
int i = 0x00112233;
But this throws an error:
string str = "0x00112233";
int i = int.Parse(str);
Any ideas? Thanks in advance.
Update:
I've tried using \x00112233 instead, and also (int) and Convert.ToInt32 for conversions (for both type of string values). Nothing has yet to work.
Last edited: