The idea is to avoid the fragile base class as far as possible.
Suppose you provide a library and I get one of your classes. I create my own Foo() method and name it accordingly. Good.
Now you present the second version of your library and add the Foo() method (with the same signature) to the base class. Now your code will call Foo() , which has one specific meaning ... and this may be a completely different value for my Foo() method. The default behavior (and the behavior if you add the new modifier) should behave as it should: code that knows only about the base class will call your method - and that's fine, as well as what they mean. Code that uses an expression that has a compile-time type of my derived class will use my method — and that's fine, as well as what they should mean. (In principle, this can only be my code, because only my code knows about my class.)
Usually this should be avoided - this can lead to subtle errors when changing the type of compilation time changes the user behavior ... but it is present for this kind of situation. In principle, adding a method to a base class should not interrupt derived classes as much as possible.
source share