Example #1
0
        static void Main(string[] args)
        {
            printer += Print;
            printer += Print2;

            PrintDelegateEventArgs printArg = new PrintDelegateEventArgs();

            printArg.printString = "Hello World !!";

            printer("String", printArg);
        }
Example #2
0
 static void Print2(object sender, PrintDelegateEventArgs iarg)
 {
     Console.WriteLine("*****");
 }
Example #3
0
 static void Print(object sender, PrintDelegateEventArgs iarg)
 {
     Console.WriteLine($"Print requested for {iarg.printString}");
 }