Chapter 10. Inheritance and Polymorphism

Team-Fly    

 
Visual Basic .NET Unleashed
By Paul Kimmel
Table of Contents
Part II.  Advanced Object-Oriented Programming


In This Chapter

  • Inheritance Basics

  • What Is Inheritance?

  • Defining Classes That Must Be Subclassed

  • Defining Classes That Cannot Be Subclassed

  • Polymorphism

  • Dynamic Typecasting

  • Defining Interfaces

  • Summary

Visual Basic .NET supports inheritance. VB6 did not. VB6 supported interface implementation, which is a facility of the Component Object Model (COM). Why Microsoft chose to implement COM and interfaces before classes and inheritance is anybody's guess, but Visual Basic .NET supports both interfaces and inheritance. The net result is that Visual Basic .NET is significantly more powerful and has features and capabilities consistent with the most advanced languages available today.

Through version 6, we said that Visual Basic was object-based rather than object-oriented. The primary missing ingredient was inheritance. Visual Basic .NET rectifies this deficit.

Chapter 10 demonstrates how to use inheritance in Visual Basic .NET, as well as the new capabilities associated with inheritance relationships. Additionally there are revisions to the way interfaces are supported in Visual Basic .NET. Chapter 10 will demonstrate inheritance, virtual abstract classes, final classes, polymorphic behavior, dynamic typecasting, and how to define and implement interfaces in Visual Basic .NET.


Team-Fly    
Top
 


Visual BasicR. NET Unleashed
Visual BasicR. NET Unleashed
ISBN: N/A
EAN: N/A
Year: 2001
Pages: 222

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net