Late Binding Example : Late Binding « Development « VB.Net






Late Binding Example

Late Binding Example
Imports System.Reflection

Module Module1

    Class Book
        Public Sub ShowValues()
            Console.WriteLine("Book")
        End Sub

    End Class

    Class Software

        Public Sub ShowValues()
            Console.WriteLine("Software")
        End Sub

    End Class

    Sub LateBinding(ByVal Obj As Object)
        Obj.ShowValues()
    End Sub

    Sub Main()
        Dim ComputerBook As New Book()
        Dim GameProgram As New Software()

        LateBinding(GameProgram)
        Console.WriteLine()
        LateBinding(ComputerBook)

    End Sub

End Module

           
       








Related examples in the same category