public void EventHandlerExample() { var helper = new EventHelper(); //helper.OnChange += Write1; helper.OnRun += (sender, args) => Console.WriteLine(args.ToWrite); helper.RaiseWrite("Event Handler Invoked"); Console.ReadKey(); }
public void InvokeEventsExample() { var helper = new EventHelper(); //helper.OnChange += Write1; helper.OnChange += (x) => Console.WriteLine(x); helper.OnChange += (x) => Console.WriteLine(x + " " + x); helper.Raise("Invoked"); Console.ReadKey(); }