Mono Class Library: System.Char Overview | Members

System.Char.GetNumericValue Method

Returns the numeric value associated with the Unicode character at the specified position in the specified string.

public static double GetNumericValue (string s, int index)

Parameters

s
A string.
index
A int that specifies the position of a character in s.
index
Documentation for this section has not yet been entered.

Returns

A double representing the numeric value associated with the char at position index in s if and only if that char has an associated numeric value; otherwise, -1.0.

Exceptions

TypeReason
ArgumentNullExceptions is a null reference.
ArgumentOutOfRangeExceptionThe value of index is less than zero, or greater than or equal to the length of s.

Remarks

A character has an associated numeric value if and only if it is a member of one of the following categories in System.Globalization.UnicodeCategory: System.Globalization.UnicodeCategory.DecimalDigitNumber, System.Globalization.UnicodeCategory.LetterNumber, or System.Globalization.UnicodeCategory.OtherNumber .

Requirements

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