What is the difference between shadow and override ?
Difference between shadow and override:-
Shadowing hide the inherrited method using new keyword and CLR choose the target mthod between the parent and child to call using the object's runtime type.Overriding hide the inherrited method using override keyword and the parent should be virtual. overrding always choose the object's compile-time type.
SHADOW-Protecting against a subsequent base class modification introducing a member you have already defined in your derived class.
OVERRIDE-Achieving polymorphism by defining a different implementation of a procedure or property with the same calling sequence
SHADOW:-Any declared element type.
OVERRIDE:-Only a procedure (Function or Sub) or property
OVERRIDE:-Cannot expand the accessibility of overridden element (for example cannot override Protected with Public)
4-Readability and writability
OVERRIDE:-Cannot change readability or writability of overridden property
SHADOW:-Shadows recommended in derived class; Shadows assumed if neither Shadows nor Overrides specified.
OVERRIDE:-Overridable required in base class; Overrides required in derived class