What is Method Overriding? How to override a function in C#?
Answers
Answered by
1
Hey buddy!
Method overriding, in object-oriented programming, is a language feature that allows a subclass or child class to provide a specific implementation of a method that is already provided by one of its superclasses or parent classes.
Method overriding is possible only in derived classes. Because a method is overridden in the derived class from base class. A method must be a non-virtual or static method for override. Both the override method and the virtual method must have the same access level modifier.
I hope you find this answer helpful!
pls mark this as brainliest!!
Similar questions