How to convert a hex string to an integer
The MSDN page that tries to answer this question is an absolutely horrible example of how a compact and simple piece of information can be made almost impossible to understand: How to use the Int32.Parse method to convert the string representation of a hexadecimal integer to a decimal integer by using Visual C# .NET
Here is what it should have said:
To convert a hexadecimal string to an integer:
string s = "a0"; // 160 in hexadecimal
int i = int.Parse(s, System.Globalization.NumberStyles.AllowHexSpecifier);
NOTE: If the string includes the standard "0x" prefix, a System.FormatException will occur.