Public Class Tester
Public Shared Sub Main
Dim objDerivedClass As New DerivedClass
Console.WriteLine(objDerivedClass.Value)
End Sub
End Class
Class BaseClass
Public Value As Double = 3.14
End Class
Class DerivedClass
Inherits BaseClass
Public Shadows ReadOnly Property Value() As Double
Get
Return 2.7
End Get
End Property
End Class
|