仍然围绕着 Delegates,我很好奇:是否可以重载匿名函数?
这样:
delegate void Output(string x, int y);
支持:
Output show = (x, y) => Console.WriteLine("{0}: {1}", x.ToString(), y.ToString());
和:
delegate void Output(string x, string y);
允许:
show( "ABC", "EFG" );
和:
show( "ABC", 123 );