Example #1
0
        public void OnMyEvent(MyEventArgs args)
        {
            EventHandler <MyEventArgs> handler = MyEvent;

            handler?.Invoke(this, args);
        }
Example #2
0
 static void OnMyEvent2(object sender, MyEventArgs a)
 {
     Console.WriteLine($"MyEvent2 args = {a.EventType}, {a.Payload}");
 }
Example #3
0
 static void MaximumReached(object source, MyEventArgs e)
 {
     Console.WriteLine(e.GetInfo());
 }