A parent class method can be redefined under it's child class using two different approaches.
- Method Overriding.
- Method Hiding.
In Method Hiding also parent class methods can be redefine under child classes even if they were not declared as Virtual by using 'new' keyword.
Example :
loadparent:
public void test()
-----------------------------------
loadchild : loadparent
public new void test()
No comments:
Post a Comment