#region 委托、事件 static void ChineseGreeting(string name) { Console.WriteLine("早上好," + name); } static void EnglishGreeting(string name) { Console.WriteLine("Good Morning," + name); } delegate void GreetDelegate(string name); static void Greeting1(string name, GreetDelegate greetFunc) { greetFunc(name); } static void Greeting2()//绑定方法 { GreetDelegate dele1 = ChineseGreeting; dele1 += EnglishGreeting; Greeting1("Zheng", dele1); dele1 -= ChineseGreeting; dele1("Jonathan"); } //public event GreetDelegate del2; #endregion