class Program { static void Main() { EventHandler handler; handler = delegate { Console.WriteLine("Handled anonymously"); }; handler(null, EventArgs.Empty); Console.ReadKey(); } }
时间: 2024-10-14 14:14:44
class Program { static void Main() { EventHandler handler; handler = delegate { Console.WriteLine("Handled anonymously"); }; handler(null, EventArgs.Empty); Console.ReadKey(); } }