What the hell?! Hex number parsing
I have the strong feeling that I am missing something here, this fails:
try { Console.WriteLine(long.Parse("0x9f",NumberStyles.AllowHexSpecifier|NumberStyles.HexNumber, CultureInfo.InvariantCulture)); } catch (Exception e) { Console.WriteLine(e); }
Unlike the previous challenges I posted, I truly have no idea why this doesn’t work. I moved to use Convert.ToInt64, that does work. But everything I know (including the docs) tell me that this should work.

Comments
Comment preview