Skip to Content
A Programmer's Introduction to Visual Basic® .NET
book

A Programmer's Introduction to Visual Basic® .NET

by Craig Utley
December 2001
Intermediate to advanced content levelIntermediate to advanced
360 pages
9h 6m
English
Sams
Content preview from A Programmer's Introduction to Visual Basic® .NET

When to Use and When Not to Use Inheritance

When inheritance was first introduced into some other languages, it caused problems as users went too far, creating deep and overly complex inheritance trees. Inheritance is powerful and useful, but should not be overdone. I remember working with a developer. He spent an entire day working on the design of objects and finally said, “I can't figure out where to use polymorphism.” My suggestion was that if he couldn't find where to use it, maybe he didn't need to.

There are actually three ways to build an object model:

  • Encapsulation— If you want to use functionality from an object, but not really look like the object or override its functionality, don't inherit; instead, encapsulate an instance of the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Visual Basic® Programmer's Guide to the .NET Framework Class Library

Visual Basic® Programmer's Guide to the .NET Framework Class Library

Lars Powers, Mike Snell
Application Development Using Visual Basic® and .NET

Application Development Using Visual Basic® and .NET

Robert J. Oberg, Peter Thorsteinson, Dana L. Wyatt
Visual Basic® .NET by Example

Visual Basic® .NET by Example

Gabriel Oancea, Bob Donald

Publisher Resources

ISBN: 0672322641Purchase book