コード例 #1
0
        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(", ", StringSplitOptions
                                                 .RemoveEmptyEntries)
                        .ToArray();

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


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

            for (int i = 0; i < n; i++)
            {
                var command = Console.ReadLine()
                              .Split(": ", StringSplitOptions.RemoveEmptyEntries)
                              .ToArray();

                switch (command[0])
                {
                case "Edit":
                    article.Edit(command[1]);
                    break;

                case "ChangeAuthor":
                    article.ChnageAuthor(command[1]);

                    break;

                case "Rename":
                    article.RenameArticle(command[1]);
                    break;

                default:
                    break;
                }
            }

            Console.WriteLine(article.ToString());
        }