thanx timmy...but its not a complete answer ...
And what, in your opinion, would a complete answer look like? If you have a question about my answer or a question about the original post, please ask it. If you don't understand the answer, tell me which part you don't understand, but posts like this one are
not an incintive for me to try and help.
Furthermore, I feel that the answer I gave is a complete answer. The reason it doesn't work is in the second case, a constructor using a collection is called, but in the first case an illegal cast is attempted.
Beyond that, I try to go into detail about
why the code is wrong, explaining, albiet very briefly, that one cannot arbitrarily cast objects into other objects just because they have common anscestors.
Any lingering doubts?
Tim
P.S. I didn't add anything else to my previous reply, only reworded it. If it is now a "complete answer" then the problem lies with either my English or yours.