I was just trying to master the concept of virtual function using a console app. I noticed as soon as I override a base class function, return baseclassname.functionname(parameters) gets inserted in my function body automatically. Why does this happen?
class advanc
{
public virtual int calc (int a , int b)
{
return (a * b);
}
}
class advn : advanc
{
public override int calc(int a, int b)
{
//automatically inserted
return base.calc(a, b);
}
}