3 ms·
In any sensible OO language (i.e. not C++) all method calls will be virtual, so there is always some sort of dynamic lookup involved.
by extension 15y ago
In any sensible OO language (i.e. not C++) all method calls will be virtual, so there is always some sort of dynamic lookup involved.
- AndrewDucker 15y agoIn C# you have to specify that a method is virtual if you want people to be able to override it. This makes it clear where you expect people to insert their changes, allows you to design extra safety into those points, and makes the code faster.