示例#1
0
        static void Main(string[] args)
        {
            new Presenter();
            string str = "";

            while (true)
            {
                str = Console.ReadLine();
                if (!string.IsNullOrEmpty(str))
                {
                    TextAdd.Invoke(str);
                }
            }
        }
        static void Main(string[] args)
        {
            new Presenter();  // Для статического класса нельзя передать ссылку на себя (this) в конструкторе
            string str = "";

            while (true)
            {
                str = Console.ReadLine();
                if (!string.IsNullOrEmpty(str))
                {
                    TextAdd.Invoke(str);
                }
            }
        }