Option Strict On
Public Class ShadowClass
Private value As String
Public Sub New(value As String)
Me.value = value
End Sub
Public Shadows Function ToString() As String
Return "Value of " & Me.GetType.Name & ": " & Me.value
End Function
End Class
Public Module ShadowTest
Public Sub Main()
Dim sc As ShadowClass = New ShadowClass("The Shadow")
Console.WriteLine(sc.ToString())
Dim obj As Object = New ShadowClass("The Shadow")
Console.WriteLine(obj.ToString())
End Sub
End Module
|