Public Class Address
Private MyState as String = "DEFAULT"
Sub New()
MyBase.New()
Console.WriteLine("Address Created")
End Sub
Public Property State As String
Get
Return MyState
End Get
Set(Value As String)
MyState = Value
End Set
End Property
End Class
Public Class MyAddress
Inherits Address
Private MyAddress as String
Sub New()
MyBase.New()
Console.WriteLine("MyAddress Created")
End Sub
Public Property Address as String
Get
Return MyAddress
End Get
Set(Value As String)
MyAddress = Value
End Set
End Property
End Class
Module Test
Sub Main()
Dim SL As New MyAddress()
SL.State = "CANADA"
SL.Address = "123"
End Sub
End Module
|