using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp6 { class Program { public delegate void SaySomething(string name); //定义委托 public static event SaySomething peopleCome; //定义事件 关注SaySomething委托,当事件发生的时候,会通知关注的“委托”(再由这些“委托”去调用具体的方法)。 private delegate double DoCallFunc(double num1, double num2); static void Main(string[] args) { peopleCome += SayHello; //注册方法到事件上 peopleCome += SayNiceToMeetYou; //注册方法到事件上 peopleCome += SayGoodbye; //注册方法到事件上 peopleCome("张三"); //绑定触发事件 Console.WriteLine("====================================="); int x