I know it can be done in Java, as I have used this technique quite extensively in the past. An example in Java would be shown below. (Additional question. What is this techn
The Java technique is called "Anonymous inner class", and there is no equivalent in C#.