Virtual and override | Sololearn: Learn to code for FREE!

+2

Virtual and override

so why not just simply code the method in the derived class and not on the base class ?

3/28/2017 2:13:03 PM

Gero Manalili

2 Answers

New Answer

+2

C isn't object oriented, it doesn't have polymorphism. If you meant C++ or C#, you need to declare polymorphic functions in the base. Then code that uses the base class can call polymorphic methods.

0

i meant for the c# sorry for that confusing tag