标签: c# events delegates
这两行有什么不同吗?他们在做同样的事吗?
c1.AboutToBlow += new EventHandler<CarEventArgs>(c1_AboutToBlow); c1.AboutToBlow += c1_AboutToBlow; static void c1_AboutToBlow(object sender, CarEventArgs e) { Console.WriteLine("Hello!"); }