I tried parsing a number with .NET Int64.Parse method, and it won’t accept a string like “0x3039”, even though that’s how you write the constant in C#. The documentation specifically disallows the string to have a “0x” prefix, and a trailing “h” doesn’t seem to work either.
To parse a hexadecimal number, I must have to use the System.Globalization.NumberStyles.HexNumber option.
If anyone knows off hand, for certain, that Int64.Parse() cannot accept strings with a “0x” prefix, please let me know.
The documentation gives the expressions for the supported number formats and accordingly neither prefixes nor postfixes are allowed for hexadecimal numbers.
Convert.ToInt32(String, Int32)supports the prefixes0xand0Xwhen using base 16.