Adam Burton wrote:
I wouldn't think so, cos LinkSeq!(Apple) does not inherit LinkSeq!(Fruit),
they are 2 separate types. However your apples automatically downcast (or
up, depending which way you like to draw your diagrams :-) ) so unless you
intend to pass the LinkSeq!(Apple) into a function expecting LinkSeq!(Fruit)
it shouldn't be a problem. If you are passing about LinqSeq!(Fruit) and want
your LinkSeq!(Apple) to fit you might need to write some adapters and make
use of the models available to you or something along them lines.
That's my understanding anyway.
yes. I can cast all Apple-object to Fruit-objects one by one. I hope
there is an one-line-solution :-)
--
Xu, Qian (stanleyxu)
http://stanleyxu2005.blogspot.com