When discussing sealed classes, the term \"virtual function table\" is mentioned quite frequently. What exactly is this? I read about a method table a while ago (I don\'t re
The definition for Virtual Function Table (often call vtable) is the same in C# and C++. It is an lookup table use internally by the runtime to achieve the polymorphic behaviors of abstract/virtual/override method.
In simple you can imagine a base class with a virtual methodA will have a vtable that contains methodA. When derived class override methodA, the vtable for methodA inherits from the parent class but will now points to the methodA in the derived class rather than parent class.