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); }
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); }