This MSDN KB article gives an example of converting a hexadecimal string to an Int32. The new one for me was the use of NumberStyles.AllowHexSpecifier. You thought that it means you could expect the "0x" specifier (if your a c#'ee). You would be wrong:
| AllowHexSpecifier
Supported by the .NET Compact Framework. |
Indicates that the numeric string represents a hexadecimal value. Valid hexadecimal values include the numeric digits 0-9 and the hexadecimal digits A-F and a-f. Hexadecimal values can be left-padded with zeros. Strings parsed using this style are not permitted to be prefixed with "0x". |