예제 #1
0
        public void SendBreakingNews(string title, string content, DateTime date)
        {
            NewsEventArgs News = new NewsEventArgs(title, content, date);

            if (EventBreakingNews == null)
            {
                Console.WriteLine("No subscribers");
                return;
            }
            EventBreakingNews(this, News);
        }
예제 #2
0
 public void PrintNews(object obj, NewsEventArgs e)
 {
     Console.WriteLine($"{e.Title} {e.Content} {e.Date}");
 }
예제 #3
0
 public void PrintNews(object obj, NewsEventArgs BreakingNews)
 {
     Console.WriteLine($"{BreakingNews.Title} {BreakingNews.Content} {BreakingNews.Date}");
 }