protected virtual void OnMailArrived(Object sender, MailArrivedEventArgs e) { if (MailArrived != null) { MailArrived.Invoke(sender, e); } }
static void _mail_MailArrived(object sender, MailArrivedEventArgs e) { System.Threading.Timer t = new Timer(state => { Console.WriteLine("New Mail Title:{0} Body{1}", e.Title, e.Body); }); }