如果理解以下代码的第二行有问题:
Dim locSecondClass As New SecondClass
Dim locFirstClass As FirstClass = locSecondClass
Public Class FirstClass
Public Overridable Function aFunktion() As String
Return "First Class"
End Function
End Class
Public Class SecondClass
Inherits FirstClass
Public Overrides Function aFunktion() As String
Return "Second Class"
End Function
End Class
里面有什么locFirstClass
?如果它的类型是FirstClass
但是locSecondClass
被复制到其中?Inherits First Class
也是抄进locFirstClass
的?如果类SecondClass
有一个不存在的函数/方法会发生什么FirstClass
?