Sunday, February 12, 2023

How do you hide base class methods?

Using the new keyword in the derived class, the base class method can be hidden or suppressed. New implementation can be added to the derived class.

Or In other words, 
In method hiding, we can redefine the base class method in the derived class by using the new keyword.

No comments:

Post a Comment