it is like you are converting a dog to Cat. which is practically not possible that why when you run this program at run time your animal has reference to Dog then it get casted to Cat which is not possible and it will give you Typecast exception. If i miss something let me know. Thanks!
What's brown and sticky? ... a stick. Or a tiny ad.
Free, earth friendly heat - from the CodeRanch trailboss