|
June 5, 2002 Writing a Classic Base Class Tips: June 2002
Yehuda Shiran, Ph.D.
|
|
A base class in JScript .NET is like any other classes. You cannot tell a base class from a class that is not extended by other classes. Here is the Employee class, which we can use as a base class for other classes, such as the
Manager class (not shown here):
Let's create an instance of the Employee class, and set its name and address:
The command Bob.printMailingLabel() will yield the following output:
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: |