Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dense Newbie
Message
 
To
02/12/2003 16:42:22
Del Despain
Colorado Plateau Associates
Hurricane, Utah, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Miscellaneous
Thread ID:
00854881
Message ID:
00855296
Views:
18
Del,

>1) If I override a method in my application level business class, but still want the functionality of an existing override in my company level business class from which aBusinessObject is derived, I must explicitly call that parent class with base.method() from within the application level override. If the inheritance chain is longer, I would need each level to explicitly call its' parent method in order to extend functionality to the bottom of the chain, otherwise the overridden methods are not fired.

>2) I am not allowed to assign an override method within the company level businessobject as "virtual", but I don't need to because once the method is declared as virtual at the top level, it remains virtual on down the chain unless I explicitly declare it otherwise.

>3) If I declare a method in a child class with the same name as one in the parent class, but don't give it the same number of parameters (a different signature) as the method in the parent, then it will be treated as a different method, just like overloaded methods within the same class.

You're right on all counts! With #1, as you mentioned, if you override a method, you must call the base class method from within the override if you don't want to break the inheritance chain for that method.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform