Example #1
0
 public static void Start()
 {
     OutputHandler.PrintWelcomeMessage();
     int.TryParse(Console.ReadLine(), out int chooseOfUser);
     ChoosingOfAction(chooseOfUser);
     return;
 }
Example #2
0
        public static void ChoosingOfAction(int userChoose)
        {
            switch (userChoose)
            {
            case 1:
            {
                OutputHandler.PrintActionMode();
                WordsCounter.Start();
                Console.ReadKey();
                Start();
                break;
            }

            case 2:
            {
                OutputHandler.PrintDescription();
                Start();
                break;
            }

            case 3:
            {
                return;
            }
            }
        }
Example #3
0
        public static void Start()
        {
            CreatingListOfWords();

            var sortedWords = from word in words
                              orderby word.Count
                              select word;

            foreach (Word w in sortedWords)
            {
                PrintOfWord(w);
            }
            OutputHandler.PrintBackToMain();
        }