microsoft.public.dotnet.framework.windowsforms: Inheritance in forms which inherit template forms
Inheritance in forms which inherit template forms
Source: http://www.tech−archive.net/Archive/DotNet/microsoft.public.dotnet.framework.windowsforms/2005−01/0039.html
From: michael (howlinghound_at_nospam.nospam) Date: 01/02/05
Date: Sun, 2 Jan 2005 10:17:03 −0800
I have this "template" form which is based on System.Windows.Forms.Form. I created a new form(the derived form) which inherits this form. I have observed that if, at runtime, I run through all of the controls in the controls collection of the "template" form, I can have access to all the controls that exist in the derived form! Now this seems odd to me; why should a base class have the controls of a class above it (the derived form), in its controls collection. Certainly I would expect the class derived from the template to see all the controls on the base class but not the other way around.
−− Michael Hockstein
Inheritance in forms which inherit template forms
1