System.Char.IsDigit Method

Indicates whether the specified Unicode character is categorized as a decimal digit.

Syntax

public static bool IsDigit (char c)

Parameters

c
The Unicode character to evaluate.

Returns

true if c is a decimal digit; otherwise, false.

Remarks

This method determines whether a char is a radix-10 digit. This contrasts with char.IsNumber(char), which determines whether a Char is of any numeric Unicode category. Numbers include characters such as fractions, subscripts, superscripts, Roman numerals, currency numerators, encircled numbers, and script-specific digits.

Valid digits are members of the System.Globalization.UnicodeCategory.DecimalDigitNumber category.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0