Very fascinating, I also didn't know that. But the principle is simple, it
simple sets the entry of the ToString() method in the vtable of the class
Foo to null.
Again assuming the base class is abstract you could define the operators
in the base class and then delegate the calculation to abstract template
methods which the derived classes must define.
In the case of the equality operator you could define the == and !=
operators in the base class and force Equals() and GetHashCode() to be
overridden using an abstract override in the same way as ToString().
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.