System.Globalization.CharUnicodeInfo.GetDigitValue Method

Gets the digit value of the numeric character at the specified index of the specified string.

Syntax

public static int GetDigitValue (string s, int index)

Parameters

s
The string containing the Unicode character for which to get the digit value.
index
The index of the Unicode character for which to get the digit value.

Returns

The digit value of the numeric character at the specified index of the specified string.

-or-

-1, if the character at the specified index of the specified string is not a digit.

Remarks

Digit value is a property that applies only to numeric characters that can be used as digits. A digit is a numeric character that can be combined with other digits to represent a whole number in a numbering system.

For more information on Unicode characters, see the tp://go.microsoft.com/fwlink/?linkid=37123.

Requirements

Namespace: System.Globalization
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0