Derivation and Inheritance

jfackler

Well-known member
Joined
Mar 15, 2003
Messages
393
Location
Cincinnati, Ohio
User Rank
*Experts*
Code:
Class Mom
    Public FirstName As String
    Public LastName As String

Sub New (ByVal FirstName As String, ByVal LastName As String)
    Me.FirstName = FirstName
    Me.LastName = LastName
End Sub
End Class

Class Son
     Inherits Mom

  Public Name

  Public Sub New (ByVal FirstName As String, ByVal LastName As String)

   MyBase.New (FirstName, LastName)

  Me.Name = "Son of " & FirstName & " " & LastName

End Sub
End Class


Its Mothers Day here in the States, a national holiday for obstetricians, of which I am one.

Call your mother.

Jon
 
Last edited by a moderator:
Back
Top