public static int HexToInt(this string value) { if (value.Length == 2) { return 0; } return Convert.ToInt32(value, 16); }