|
-
Jul 26th, 2002, 01:08 PM
#1
Lively Member
And it's one line of code. At level two of our class hierarchy, and it's working a treat. Thanks MS for this long anticipated feature.
A couple of the C++ guys at the office had a look, and were very impressed by the usage of inheritance in vb.net. Of course they still claim C++ owns vb, but what do you expect. Monday might just show them C#. hehehehehehe.
As stated, it appears to be a tree structure which IMO is the logical way to organise it. So in your case it would be logical to declare
Vehicle
Car inherits from Vehicle.
Plane inherits from Vehicle.
SuperVehicle inherits from Car and Plane, and thus vehicle.
The major headache l'm having is deciding at what level a property should be declared. It really takes some nutting out whether classes should all have a property for say model (hence pop it into the top class and inherit it), or make it specific to a class... it's actually forcing us to spend more time on design. Which is a good thing.
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
|