Answer: When you override any function or any function is overridable then apply virtual keyword with that function in base class and in derived class add override keyword with that function.
Example:
Class parent{
public virtual void fun_overridable(){//some code here}
}
class child:parent{
public override void fun_overridable(){//some code here}
}
Asked In: Many Interviews |
Alert Moderator