Slide 19
Slide 19 text
public class Base
{
public virtual int GetId()
{ … }
}
public class A : Base
{
public override int GetId()
{ … }
}
public class B : A
{
public new int GetId()
{ … }
}
For example, looking at the table information for class B, the function pointer of the A
side with override GetId() and the function pointer of GetId() redefined for class B with
new are stored, The function pointer of GetId(), which is redefined for class B with new,
is stored in the table.
Objects of class B
Class Base, A, and
B information
vtable for class B
A:GetId()
B:GetId()
vtable example
About vtable