Determines whether a digit is valid in the counting system based on a specified radix.
[Visual Basic] Public Shared Function IsDigit( _ ByVal c As Char, _ ByVal radix As Integer _ ) As Boolean [C#] public static bool IsDigit( char c, int radix ); [C++] public: static bool IsDigit( __wchar_t c, int radix ); [JScript] public static function IsDigit( c : Char, radix : int ) : Boolean;
Returns true if and only if c is a valid digit of base radix.
Exception Type | Condition |
---|---|
FormatException | if radix is greater than MaxRadix or less than MinRadix. |
The possible digits are chosen in this order: "0123456789abcdefghijklmnopqrstuvwxyz". Case is ignored in this comparison, i.e., "a" == "A." If the radix is N, the first N characters are considered digits in that base.