0
How is method hiding is different than method overriding in c#
1 Answer
+ 2
Method Overriding. It means that you are invoking a method from the base class and the derived class at the same time. Use virtual keywords to indicates that method can be overriden by the derived/inherited classes. And use override keyword to allow the derived class to override a method in the base class. We use method overriding to modify the methods behavior.
Method hiding is a technique where you encapsulate a method on a specific class so that it cannot be exposed directly on the real-world and with the help of access modifiers you can determine where you can only access a method.
In c# we have 5 access modifiers. We have public, private, protected, internal and protected internal.
Hot today
What's wrong? :(
1 Votes
Why won't my image display
0 Votes
How the answer is 50?
0 Votes
Number of Ones ( C++ ) question!
1 Votes