Methods marked as virtual
can be overridden in derived classes. One of the restrictions is that overriding and overridden methods must have same accessibility. Thus, if virtual method is marked as protected internal
, then overriding method must also be marked as protected internal
(it cannot be for example marked as just protected
).
Since Page
class overrides Control.CreateChildControls()
, which is marked as protected internal
, then Page.CreateChildControls()
should also be marked as protected internal
, but instead is marked as protected
. How is that possible?