Anonymous inner classes in C#
问题 I'm in the process of writing a C# Wicket implementation in order to deepen my understanding of C# and Wicket. One of the issues we're running into is that Wicket makes heavy use of anonymous inner classes, and C# has no anonymous inner classes. So, for example, in Wicket, you define a Link like this: Link link = new Link("id") { @Override void onClick() { setResponsePage(...); } }; Since Link is an abstract class, it forces the implementor to implement an onClick method. However, in C#,