How CLR calls methods correctly hidden by derived class when reference is stored in a base class variable?
问题 I am trying to understand how CLR dispatches method call correctly when an object hides base class member when object reference is stored in a base class variable. The point of my confusion is the object header created by runtime. The object header on heap has two fields: Type pointer and Sync block index. The type pointer points to the method table of the class. Even if the object reference is of base class, the object created on heap is of derived class. This should cause runtime to use