Microsoft.JScript.GlobalObject.parseInt C# (CSharp) 메소드

parseInt() 개인적인 메소드

private parseInt ( Object @string, Object radix ) : double
@string Object
radix Object
리턴 double
      public static double parseInt(Object @string, Object radix){
        String str = Convert.ToString(@string);
        return Convert.ToNumber(str, true, true, radix);
      }

Usage Example

예제 #1
0
        public static double ToNumber(string str)
        {
            if (str == "")
            {
                return(0);
            }

            if (str.IndexOfAny(new char [] { 'x', 'X' }) != -1)
            {
                return(GlobalObject.parseInt(str, null));
            }
            else
            {
                return(GlobalObject.parseFloat(str));
            }
        }
All Usage Examples Of Microsoft.JScript.GlobalObject::parseInt