Vijay Kumar
What is the Difference between Abstract Function and Virtual Function ?
By Vijay Kumar in .NET on Sep 09 2014
  • Vijay Kumar
    Sep, 2014 9

    Abstract function:--> 1) An abstract function has no implementation. It can only be declared. This forces the derived class to provide the implementation of it. 2) Abstract means we MUST override it. 3) An abstract member is implicitly virtual. Abstract can be called as pure virtual in some of the languages. Virtual Function:--> 1) Virtual Function has an implementation. When we inherit the class we can override the virtual function and provide our own logic. 2) We can change the return type of Virtual function while implementing the function in the child class(which can be said as concept of Shadowing). 3) Virtual means we CAN override it.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS