CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> .NET

 Basic inheretage

Print topic Send  topic

Author Message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.