Imports System
Module Test
Sub Main()
Dim acct As New Account()
Console.WriteLine(acct.AccountHolder)
Dim cAcct As New CheckingAccount()
Console.WriteLine(cAcct.AccountHolder)
End Sub
End Module
Public Class CheckingAccount
Inherits Account
Sub New()
MyBase.New
Console.WriteLine(MyBase.retrieved)
Console.WriteLine(MyBase.AccountHolder)
End Sub
End Class
Public Class Account
Protected retrieved As DateTime
Private acctHolder As String
Public Sub New()
retrieved = DateTime.Now()
acctHolder = "DEFAULT"
End Sub
Friend Property AccountHolder As String
Get
Return acctHolder
End Get
Set(ByVal Value As String)
acctHolder = Value
End Set
End Property
End Class
|