Exemple #1
0
            public static void SayHelloToWhomever(OutputProc op)
            {
                int outputCount = 0;
                int result      = op("Hello, whomever!", ref outputCount);

                Console.WriteLine("OutputCount = {0}", outputCount);
                Console.WriteLine("result = {0}", result);
            }
Exemple #2
0
            public static void OldMain(string[] args)
            {
                OutputProc op = new OutputProc(Utilities.SayHi);

                Outputter  o   = new Outputter();
                OutputProc op2 = new OutputProc(o.OutputIt);

                op += op2;
                SayHelloToWhomever(op);

                Person p = new Person("Michael", "Blumberg", 18);

                p.FirstNameModifed += new EventHandler(Program.PersonEvtHandler);
            }