|
-
May 5th, 2005, 12:47 AM
#1
Thread Starter
Junior Member
Inheritance and Collections
I have a base class called Vehicle and a collection of Vehicles called VehicleCollection.
I created another class called Truck derived from the base class Vehicle. The Truck class has an extra property called Trailer.
Can I create an instance of the VehicleCollection and add a Truck object to the collection?
If so how can I access the property Trailer? myVehicle[0].Trailer doesn't work.
Any advice on how to get round this would be great.
Thanks
R
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|