public static bool InHexFormat(string hexString) { foreach (var digit in hexString) { if (!IsHexDigit(digit)) { return false; } } return true; }