I read in one of Jesse Liberty's books that:
"Because ToString() is a virtual method in the base class Object, it
is guaranteed to be available in every derived class." (P.179
Programming C#)
My question is, wouldn't the ToString() method be guaranteed to be
available to derived classes even if it had not been declared as
virtual?
I thought virtual just made it so the derived class's version of the
ToString() method would be called instead of the Object's version when
the overide keyword was used in the derived method's declaration.
How does NOT using virtual NOT guarantee the method's availability?
Also, anyone understand why the new/derived keywords are really
necessary? I mean like in C++, doesn't dynamic binding take place no
matter what, once the method is declared virtual in a base class?
Thanks for any help with my understanding of this.