Zyhorn
Posts: 1
|
Posted: 01/18/2007, 5:21 AM |
|
hi all
Take a look at the following code:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim b As bas
If 1 = 1 Then
b = New child
End If
b.s = "w"
End Sub
End Class
Public Class bas
End Class
Public Class child
Inherits bas
Public s As String
End Class
I get an error at the line "b.s = "w"" telling me that "w is not a part of bas". This is correct, but I assumed that the object b is of type child...?
Why doesn't this work?
Version: ASP.NET 2.0 (VB) VS2005
Thanks in advance
Zyhorn
|
|
|
|