Public Class Tester
Public Shared Sub Main
Dim objJohn As New John("Walking...")
objJohn.Walk()
End Sub
End Class
Public Class Person
Private Text As String
Public Sub New(ByVal Message As String)
Text = Message
End Sub
Public Sub Walk()
Console.WriteLine(Text)
End Sub
End Class
Class John
Inherits Person
Public Sub New(ByVal Message As String)
MyBase.New(Message)
End Sub
End Class
|