D
Daniel
Hey guys
i have a set up like this:
Interface IMyInt //interface
class myClass : IMyInt //myCLass realises that interface
class myOtherClass : myClass // a class that inherits from that parent
bound to the interface
class myClassA : myOtherClass //a class that inherits
then in my code i do this:
myClassA obj = (myClassA)myOtherClass; //<----and this throws a cannot
cast myOtherCLass to myCLassA error
myOtherClass has no private variables. Why can't it cast?
i have a set up like this:
Interface IMyInt //interface
class myClass : IMyInt //myCLass realises that interface
class myOtherClass : myClass // a class that inherits from that parent
bound to the interface
class myClassA : myOtherClass //a class that inherits
then in my code i do this:
myClassA obj = (myClassA)myOtherClass; //<----and this throws a cannot
cast myOtherCLass to myCLassA error
myOtherClass has no private variables. Why can't it cast?