spacer
Yehuda Shiran June 18, 2002
Changing the Base Class Members
Tips: June 2002

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Google Chrome Playing Catch-Up on Extensions
Open Solutions Alliance Gets New Leadership
Red Hat Spacewalk Expands Linux Management
When a new class inherits from a base class, it gets all the base's members. You cannot get rid of these members. You can do one of the three: accept, hide, or override them. The default is to accept them. You accept them by refraining from their redefinition in the derived class. Simply put, do not define a derived class's member with the same name as a base class's member. When you do redefine a base member, you override the base class's member by default. This is how you override a base class. You can reflect this overriding by adding override to the member definition, as we have shown in Column 110. When you override a member, the behavior of both base objects and derived objects change. They all sport the new behavior. When you want to change the behavior of derived objects and keep the original behavior of base objects, mark your derived members with hide. The base members are hidden from the derived members (with the same name, of course). We have covered how to use the hide modifier in Column 110.

To learn more about JScript .NET, go to Column 110, JScript .NET, Part IV: Inheritance.


People who read this tip also read these tips:

Look for similar tips by subject:

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

webref The latest from WebReference.com Browse >
Administering MySQL Databases on the Web Using PHP · Popular JavaScript Framework Libraries: An Overview - Part 3 · Accessing Your MySQL Database from the Web with PHP
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
So what is an Oracle Nested Table? · E-Discovery Architectures 101 · eBay Embraces Big Sellers, Cyber Monday Trends