CHAPTER 14 BUILDING AND CONFIGURING CLASS LIBRARIES
' Local variables are declared using the Dim keyword.
Dim myMiniVan As New MiniVan()
myMiniVan.TurboBoost()
Dim mySportsCar As New SportsCar()
mySportsCar.TurboBoost()
Console.ReadLine()
End Sub
When you compile and run your application, you will once again find a series of message boxes
displayed. Furthermore, this new client application has its own local copy of CarLibrary.dll located
under the bin\Debug folder.
Cross-Language Inheritance in Action
A very enticing aspect of .NET development is the notion of cross-language inheritance. To illustrate, let’s
create a new Visual Basic class that derives from SportsCar (which was authored using C#). First, add a
new class file to your current Visual Basic application (by selecting the Project Add Class menu option)
named PerformanceCar.vb. Update the initial class definition by deriving from the SportsCar type using
the Inherits keyword. Then, override the abstract TurboBoost() method using the Overrides keyword,
like so:
Imports CarLibrary
' This V "6