I need to access a few properties in a parent class from the inherited class of an object.
I hope that makes sense ...
Anyway, here is the scenario:
Maybe its a rookie question, but it doesn't seem obvious to me without writing lots of code to propagate the values to the child classes .. and in my case that will be hundreds.
I hope that makes sense ...
Anyway, here is the scenario:
VB.NET:
'This is the parent class with all the parent information
Class Parent
Private _children As Children
Private _Father As String
Private _Mother As String
End Class
'This is the children class .. a collection of child
Class Children : Inherits List(Of Child)
'Do stuff here
End Class
'This is the inherited child class .. it needs to access the parent
'class information so it can act on the values in the parent
'i.e. the child wants to know "Who's my daddy?"
Class Child
Public ReadOnly Property Father As String
Get
Return _Father
End Get
End Property
Public ReadOnly Property Mother As String
Get
Return _Mother
End Get
End Property
End Class
Maybe its a rookie question, but it doesn't seem obvious to me without writing lots of code to propagate the values to the child classes .. and in my case that will be hundreds.