示例#1
0
 public void Subscribe(Publisher pub)
 {
     pub.RaiseCustomEvent += new Publisher.TimerDelegate(Message);               //the event is attached to the delegate
 }
示例#2
0
 public void Message(Publisher pub, EventArgs e)
 {
     Console.WriteLine("You have a new message");
 }