'Visual Basic 2010 Dynamic Binding Static Typing en Dynamic Binding Partial Class Person Private m_Name As String Public Property Name() As String Get Name = m_Name End Get Set(ByVal value As String) m_Name = value End Set End Property End Class Class Example2 Public Shared Sub Main() Dim person1 As Person = New Person With {.Name = "John"} ' (1) ' person1 : static ( Person ) = dynamic ( Person ) Console.WriteLine(person1.Name) ' Dim person2 As Student = New Student With {.Name = "Jane"} ' (2) ' person2 : static ( Student ) = dynamic ( Student ) Console.WriteLine(person2.Name) ' Dim person3 As Person = New Student With {.Name = "Paul"} ' (3) ' person3 : static ( Person ) <> dynamic ( Student ) Console.WriteLine(person3.Name) ' Console.ReadLine() End Sub End Class 'Bezoek www.vbvoorbeelden.be voor meer Visual Basic voorbeelden. 'Copyright - De Wolf / vbvoorbeelden - 2003-2011 - Alle rechten voorbehouden.