Answer:
Shadowing is a vb.net concept by which we can provide new implementation for base class member without overriding the member. We can shadow abase class member in the derived class by using Shadows keyword. Method sigature, access level and return type of the shadowed member can be different than the base class.
Hiding is a c# concept by which we can provide a new implementation for the base class member without overriding the member. A base class member can be hided in the derived class using the new keyword. Method signature, access level and return type of the hidden member should be same as the base class member.
Asked In: Many Interviews |
Alert Moderator