I'm more familiar with how Java does polymorphism so I might be doing it wrong in vb
I'm trying use polymorphism and inheritance to have one instance that can take on multiple forms,
the issue is the variable is instantiated as the parent type and initialized as a child class instance but I can't access the child properties.
below is an example what i'm trying to do:
Dim animal as Animal 'instantiated as parent type
'some code later
animal= New Dog() 'no problems here
dim legs = animal.legs 'this works
dim fur = animal.fur 'this is an error
Public Class Animal
Property legs as integer
Public Class Dog
Property fur as Boolean = True
It would be great if i could get this to work.