VB.Net/Development/Late Binding
Версия от 16:40, 26 мая 2010; (обсуждение)
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