If I have an interface:
interface IMyInterface
{
void DoSomething();
}
And the implementing class:
class MyClass : IMyInterface
{
public void DoSomething()
{
}
}
Is DoSomething a candidate for inlining? I would expect no, because if it is an interface, then the object may be different as IMyInterface, so the actual method being called is unknown. But then the fact that it is not marked as virtual implies that it cannot be on the vtable, so if the object is used as MyClass, maybe it can be embedded?
source
share