Ejemplo n.º 1
0
        protected virtual void OnRaiseMyEvent(MyEventArgs e)
        {
            EventHandler<MyEventArgs> hendeler = this.RaiseMyEvent;

            if (hendeler != null)
            {
                e.AtTime = DateTime.Now;
                hendeler(this, e);
            }
        }
Ejemplo n.º 2
0
 public static void HandleMyEvent(object sender, MyEventArgs e)
 {
     Console.WriteLine("HandleMyEvent(object sender, MyEventArgs e) : ");
     Console.WriteLine(e.Message);
     Console.WriteLine(e.AtTime);
 }
Ejemplo n.º 3
0
 public static void HandleMyEvent(object sender, MyEventArgs e)
 {
     Console.WriteLine("HandleMyEvent(object sender, MyEventArgs e) : ");
     Console.WriteLine(e.Message);
     Console.WriteLine(e.AtTime);
 }