System.Globalization.CharUnicodeInfo.GetDigitValue C# (CSharp) Method

GetDigitValue() public static method

public static GetDigitValue ( char ch ) : int
ch char
return int
        public static int GetDigitValue(char ch) {
            return (InternalGetDigitValue(ch));
        }

Same methods

CharUnicodeInfo::GetDigitValue ( String s, int index ) : int

Usage Example

 /// <summary>Gets the digit value of the numeric character at the specified index of the specified string.</summary>
 /// <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.</returns>
 /// <param name="s">The <see cref="T:System.String" /> containing the Unicode character for which to get the digit value. </param>
 /// <param name="index">The index of the Unicode character for which to get the digit value. </param>
 /// <exception cref="T:System.ArgumentNullException">
 ///   <paramref name="s" /> is null. </exception>
 /// <exception cref="T:System.ArgumentOutOfRangeException">
 ///   <paramref name="index" /> is outside the range of valid indexes in <paramref name="s" />. </exception>
 public static int GetDigitValue(string s, int index)
 {
     if (s == null)
     {
         throw new ArgumentNullException("s");
     }
     return(CharUnicodeInfo.GetDigitValue(s[index]));
 }
All Usage Examples Of System.Globalization.CharUnicodeInfo::GetDigitValue