What are advantages of virtual functions?

Answer:
Different computer language has different meaning of virtual functions.

In C#, the advantages of declare a method being virtual are:
  1. It is the default implementation. The derived classes do not need to write one if it is a desired behavior.
  2. If the function/method only provides partial implementation, the derived class may choose to override it with additional codes, while the default implementation is still available to be called by the override method.
  3. Or, the derived class may override the complete method as its specialized way to do the named operation.
First answer by E4e6f4Qh4. Last edit by E4e6f4Qh4. Contributor trust: 16 [recommend contributor recommended]. Question popularity: 15 [recommend question].