G
Goran Djuranovic
Hi all,
Does anyone know how to declare a variable in a class to be accessible ONLY from a classes instantiated within that class?
For example:
************* CODE *****************
Public Class Parent
'*** HOW TO DECLARE IT ***
Dim Age As String = "1/1/2000"
Public Sub New ()
Dim child As New Child()
End Sub
End Class
Public Class Child
Public Sub GetParentAge()
'*** WHAT TO PUT HERE instead of MyParent***
MsgBox(MyParent.Age)
End Sub
End Class
*****************************************
TIA
Goran Djuranovic
Does anyone know how to declare a variable in a class to be accessible ONLY from a classes instantiated within that class?
For example:
************* CODE *****************
Public Class Parent
'*** HOW TO DECLARE IT ***
Dim Age As String = "1/1/2000"
Public Sub New ()
Dim child As New Child()
End Sub
End Class
Public Class Child
Public Sub GetParentAge()
'*** WHAT TO PUT HERE instead of MyParent***
MsgBox(MyParent.Age)
End Sub
End Class
*****************************************
TIA
Goran Djuranovic