public static bool ParseBool(String str, OutResult result)
        {
            if (str != null)
            {
                bool value;
                result.succeed = bool.TryParse(str, out value);
                return result.succeed ? value : false;
            }

            result.succeed = false;
            return false;
        }
        public static float ParseFloat(String str, OutResult result)
        {
            if (str != null)
            {
                float value;
                result.succeed = float.TryParse(str, out value);
                return result.succeed ? value : 0.0f;
            }

            result.succeed = false;
            return 0.0f;
        }
Exemple #3
0
        public static float ParseFloat(String str, OutResult result)
        {
            if (str != null)
            {
                float value;
                result.succeed = float.TryParse(str, out value);
                return(result.succeed ? value : 0.0f);
            }

            result.succeed = false;
            return(0.0f);
        }
Exemple #4
0
        public static int ParseInt(String str, OutResult result)
        {
            if (str != null)
            {
                int value;
                result.succeed = int.TryParse(str, out value);
                return(result.succeed ? value : 0);
            }

            result.succeed = false;
            return(0);
        }
Exemple #5
0
        public static bool ParseBool(String str, OutResult result)
        {
            if (str != null)
            {
                bool value;
                result.succeed = bool.TryParse(str, out value);
                return(result.succeed ? value : false);
            }

            result.succeed = false;
            return(false);
        }
        public static int ParseInt(String str, OutResult result)
        {
            if (str != null)
            {
                int value;
                result.succeed = int.TryParse(str, out value);
                return result.succeed ? value : 0;
            }

            result.succeed = false;
            return 0;
        }
 protected int IntArg(int index, OutResult result)
 {
     String str = StrArg(index);
     return StringUtils.ParseInt(str, result);
 }
 protected float FloatArg(int index, OutResult result)
 {
     String str = StrArg(index);
     return StringUtils.ParseFloat(str, result);
 }