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

            if (hendeler != null)
            {
                e.AtTime = DateTime.Now;
                hendeler(this, e);
            }
        }
Beispiel #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);
 }
Beispiel #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);
 }