If a function is declared as virtual in the base class,it is
virtual in all derived classess.
The redefiniton of virtual function in a derived class
is usually called overriding.
If we dont want to override the method we can use 'new'.
Marking the method with 'new' tells the compiler that we are not
overriding the base class implementation of method.
virtual in all derived classess.
The redefiniton of virtual function in a derived class
is usually called overriding.
If we dont want to override the method we can use 'new'.
Marking the method with 'new' tells the compiler that we are not
overriding the base class implementation of method.
No comments:
Post a Comment