I understand that overriding a method / function redefines its implementation in a derived class from its implementation in the base class.
Now, what bothers me is if I override the class in ASP.NET, for example CreateChildControls() (I randomly selected it for no particular reason), VS2008 automatically generates:
protected override void CreateChildControls() { base.CreateChildControls(); }
Good enough, the default implementation simply calls the base class CreateChildControls() .
So, if I want to run some code, since I do not know how base.CreateChildControls() , I have to do this:
protected override void CreateChildControls() { base.CreateChildControls(); }
or ignore what base.CreateChildControls() , and just do
protected override void CreateChildControls() { }
Matt
source share