Esempio n. 1
0
        static void Main()
        {
            string[] article = Console.ReadLine()
                               .Split(", ", StringSplitOptions.RemoveEmptyEntries);

            Article art = new Article(article[0], article[1], article[2]);

            int numberOfCommand = int.Parse(Console.ReadLine());

            for (int i = 0; i < numberOfCommand; i++)
            {
                string[] command = Console.ReadLine()
                                   .Split(new string[] { ":  ", ": " }, StringSplitOptions.RemoveEmptyEntries);

                if (command[0] == "Edit")
                {
                    art.Edit(command[1]);
                }
                else if (command[0] == "ChangeAuthor")
                {
                    art.ChangeAuthor(command[1]);
                }
                else if (command[0] == "Rename")
                {
                    art.Remane(command[1]);
                }
            }

            Console.WriteLine(art);
        }