0
Can anybody tell me, if the c'tor d'tor calling works the same way with polymorhism, as I instatiate a derived class?
e.g. Animal dog = new Dog(); So: C'tor(Animal) C'tor(Dog) D'tor(Dog) D'tor(Animal) Thaks for every useful answers!
1 Odpowiedź
+ 2
Yup. Dog.Finalize (the destructor) will be called first and then call Animal.Finalize, no matter whether you pass the Dog around as Dog or Animal or Object. :)