Пример #1
0
        static void Main(string[] args)
        {
            string[] readArticle   = Console.ReadLine().Split(", ", StringSplitOptions.RemoveEmptyEntries).ToArray();
            int      countCommands = int.Parse(Console.ReadLine());
            Article  article       = new Article(readArticle[0], readArticle[1], readArticle[2]);

            for (int i = 0; i < countCommands; i++)
            {
                string[] commands = Console.ReadLine().Split(": ", StringSplitOptions.RemoveEmptyEntries).ToArray();
                switch (commands[0])
                {
                case "Edit":
                    article.Edit(commands[1]);
                    break;

                case "ChangeAuthor":
                    article.ChangeAutho(commands[1]);
                    break;

                case "Rename":
                    article.Rename(commands[1]);
                    break;
                }
            }
            Console.WriteLine(article.ToString());
        }