Z
z_learning_tester
Hello, yes another beginner question that I'm sure is obvious to many here
My book is so bad. Really. It uses the exact same example of code for using
the new kw and for using virtual(in the base class) then override(in the
derived class), but fails to compare and contrast the two...
I've read this (short snippet)three times and by the looks of it they both
do exactly the same thing- allow you to derive from the base and save
writing some code in the derived class. It seems they both say "yes, use
this derived method, slightly modified, and don't use the original one in
the base class"
I know I'm missing something big here.
Any compare/contrast of using new vs using virtual and override much
appreciated.
If it's too long, maybe a reference to a good white paper or something(?)
Thanks!
Jeff
My book is so bad. Really. It uses the exact same example of code for using
the new kw and for using virtual(in the base class) then override(in the
derived class), but fails to compare and contrast the two...
I've read this (short snippet)three times and by the looks of it they both
do exactly the same thing- allow you to derive from the base and save
writing some code in the derived class. It seems they both say "yes, use
this derived method, slightly modified, and don't use the original one in
the base class"
I know I'm missing something big here.
Any compare/contrast of using new vs using virtual and override much
appreciated.
If it's too long, maybe a reference to a good white paper or something(?)
Thanks!
Jeff