コード例 #1
0
        public int CheckInput(string uncheckedString)
        {
            int checkedString;
            ConsoleReadWrite readWrite = new ConsoleReadWrite();

            while (!int.TryParse(uncheckedString, out checkedString))
            {
                Console.WriteLine("Incorrect type, try again");
                readWrite.ShowMenu();
                uncheckedString = Console.ReadLine();
            }
            return(checkedString);
        }
コード例 #2
0
        static void Main(string[] args)
        {
            ConsoleReadWrite readWrite = new ConsoleReadWrite();

            readWrite.RunMenu();
        }