override and new

  • Thread starter Thread starter naveen
  • Start date Start date
N

naveen

hi
There are 2 concepts one is new in which u redifine the method and
override in which u override a method,but when u overide u can also call the
base call method using the base keyword. when we use new keyword and
redifine a method in derived class can we call the base class method using
the same base keyword or by mentioning new we are saying that we can't
inherit that method in derived class.

Regards
Naveen
 
naveen said:
There are 2 concepts one is new in which u redifine the method and
override in which u override a method,but when u overide u can also call the
base call method using the base keyword. when we use new keyword and
redifine a method in derived class can we call the base class method using
the same base keyword or by mentioning new we are saying that we can't

The ability to call a method of the base class is entirely independent
of whether or not you're overriding a method.
 
Back
Top