Exemple #1
0
        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();
        }
Exemple #2
0
        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();
        }