C#: Creating an instance of an abstract class without defining new class
问题 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 technique called? It's hard to find an example of this without a name.) public abstract class Example { public abstract void doStuff(); } public class StartHere{ public static void main(string[] args){ Example x = new Example(){ public void doStuff(){ System.out.println("Did stuff"); } }; x.doStuff(); } } Now, my main question