// the method that implements the delegated functionality public void NewsPublished(object medium, NewsEventArgs news) { Console.WriteLine("{0} received news: \n" + "Title: {1}: \n" + "Content: {2} \n" + "Published: {3}", this.Name, news.Title, news.Content, news.Time); }
public void SendBreakingNews(string title, string content, DateTime time) { NewsEventArgs newsInfo = new NewsEventArgs(title, content, time); if (NewsChange != null) { NewsChange(this, newsInfo); } }