Q:

What is the difference between an abstract function and a virtual function in c#?

0

What is the difference between an abstract function and a virtual function?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Abstract function:

An abstract function cannot have functionality. You’re basically saying, any child class MUST give their own version of this method, however, it’s too general to even try to implement in the parent class.

Virtual function:

A virtual function is basically saying look, here’s the functionality that may or may not be good enough for the child class. So if it is good enough, use this method, if not, then override me, and provide your own functionality.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C# Interview Questions and Answers,You Need To Know

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
What is an interface class? Give one example of it... >>
<< What’s the difference between a method and a fun...