Hello Everyone i'm having trouble understand, rather not understanding why my "stuff" doesn't work correctly.
Tell me if you see anything incorrect here
Example:
Public MustInherit Class User
Dim Private _iAccountID as integer
Protected Sub New(ByVal _AccountID as Integer)
_iAccountID = _AccountID
End Sub
Protected Property AccountID() As Integer
Get
Return _iAccountID
End Get
Set(ByVal Value As Integer)
_iAccountID = Value
End Set
End Property
End Class
Public Class Child_User : Inherits User
Public Sub new(ByVal _AccountID)
MyBase.New(_AccountID)
End Sub
End Class
.... In some .aspx file
Dim CUser as new Child_User(55)
// Here is the problem
CUser.AccountID = 95
// The Problem is that my intellisense does
// not bring up the protected property
// AccountID of the base class.
//Child_User is inherited from it
//so doesn't that mean
// that it inherits anything
//declared Public and protected?
// Maybe i'm not understanding
//inheritance in
vb. I was
//under the assumption it is the
// same as in C++
I guess properties and methods of the base class
have to be declared public if you
want to access them from an new instance of a
derived class?
Please HELP!