Example #1
0
        public List <double> ReadRow(int countOfNumbers)
        {
            var text = Console.ReadLine();

            if (text != null || text != "")
            {
                var matches = AhpBuilder.GetMatches(AhpBuilder.numMatcher, text);
                if (matches.Count != countOfNumbers)
                {
                    Console.Write("Values not correct"); return(new List <double>());
                }
                return(AhpBuilder.ConvertMatchesToDoubles(matches));
            }
            else
            {
                Console.WriteLine("Exit program and enter again");
            }
            return(new List <double>());
        }