That's a very good question since MyBase.CreateChildControls is going to set ChildControlsCreated anyway.
It's a good practice to always call the base method to make sure that any necessary work that the base method carries out is done. In this case, for instance, calling the base method would take care of setting ChildControlsCreated.
I should have put in one line or the other but not both. Since the sample was intended to show how to use ChildControlsCreated, I should have omitted the call to the base method. While calling the base method does no harm here, it also does no good.
In fact, throughout the book, I typically omit the call to the base method in order to focus attention on the code technique that I'm demonstrating. That would have been an excellent choice here.
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
- Sherlock Holmes, as recorded by Sir A. C. Doyle in "The Blanched Soldier"
|