How does compiler optimize virtual methods implemented by a sealed class
问题 I'm wondering how the following code is optimized. Specifically concerning virtual and direct calls. I have commented on how I think everything is optimized but those are just guesses. public abstract class Super { public abstract void Foo(); public void FooUser() { Foo(); } } public class Child1 : Super { public override void Foo() { //doSomething } } public class SealedChild : Super { public override void Foo() { //doSomething } } class Program { void main() { Child1 child1 = new Child1();