A general question about inheritence in the .NET framework
Posted
by Grant
on Stack Overflow
See other posts from Stack Overflow
or by Grant
Published on 2010-05-03T03:04:40Z
Indexed on
2010/05/03
3:08 UTC
Read the original article
Hit count: 313
I have a general question about inheritance in the .NET framework, lets say you have 2 classes, the first is called Parent and the second is called Child. Child inherits from Parent.
Parent wants to ensure that each instance of child executes a specific piece of code when it loads irrespective of whether the child has their own onLoad code explicitly specified.
From my experience, if i handle onLoad in the parent and not in the child, the parents onLoad code will fire but if its handled in both classes only the child's code will fire.
Is this correct? and if so how can i ensure the parents code will always fire for the child...
© Stack Overflow or respective owner