Пример #1
0
        public static int InputWeight(string text)
        {
            int weight = -1;

            if (SupportingMethods.IsStringEmpty(text))
            {
                SupportingMethods.ShowMistake();
            }
            else
            {
                int input = Convert.ToInt32(text);
                if (SupportingMethods.IsRightWeight(input))
                {
                    weight = input;
                }
            }
            return(weight);
        }