R
relient
Putting Polymorphism aside. In a situation where a non-virtual method
in a base class is hiden in a derived class by declaring a method with
the same signature as in the base, you only have the option of using
the 'new' keyword but not the override keyword. Correct? That said,
explicitly marking the method with 'new' or not will result in the same
thing. Correct? But by explicitly marking it with 'new' your code
becomes self-documented to other programmers of your intention to
provide a different interpretation and implementation of the method. So
in this situation (where no polymorphism is involved); that's the
*only* use of the 'new' keyword. Correct?
in a base class is hiden in a derived class by declaring a method with
the same signature as in the base, you only have the option of using
the 'new' keyword but not the override keyword. Correct? That said,
explicitly marking the method with 'new' or not will result in the same
thing. Correct? But by explicitly marking it with 'new' your code
becomes self-documented to other programmers of your intention to
provide a different interpretation and implementation of the method. So
in this situation (where no polymorphism is involved); that's the
*only* use of the 'new' keyword. Correct?