public static bool IsCharNumber(int c, bool allowSign = true) { return (allowSign && c == 0x2D) || (c >= 0x30 && c <= 0x39); }