Shadows Override : Shadows « Class Module « VB.Net Tutorial






Public Class ClassA
    Public Function greet1() As String
        Return "Hello from classA, Greet1 (no modifiers)"
    End Function
    
    Public Overridable Function greet2() As String
        Return "Hello from classA, Greet2 (overridable)"
    End Function
End Class

Public Class ClassB
    Inherits ClassA
    
    Public Shadows Function greet1() As String
        Return "Hello from ClassB, Greet1 (shadows)"
    End Function
    
    Public Overrides Function greet2() As String
        Return "Hello from ClassB, Greet2 (overrides)"
    End Function
End Class








6.43.Shadows
6.43.1.Use 'Private Shadows' to hide member
6.43.2.Test Shadows
6.43.3.Shadows Override
6.43.4.Hiding a member