Beispiel #1
0
        public static void EnterLists(IEList list)
        {
            while (true)
            {
                Console.WriteLine("Enter item name or 'q' to quit");
                var input = Console.ReadLine();

                if (input == "q")
                {
                    break;
                }

                try
                {
                    var item = string.IsNullOrEmpty(input);
                }
                catch (ArgumentNullException ex)
                {
                    Console.WriteLine(ex.Message);
                }
                catch (FormatException ex)
                {
                    Console.WriteLine(ex.Message);
                }
                finally
                {
                    Console.WriteLine(" - - - ");
                }
            }
        }