Answer: No, you cannot, the signature of the virtual method must remain the same, only the keyword
"virtual" is changed to keyword
"override" .
//Base Class
Public Class BaseClass
{
public virtual string Name()
{
return "my name";
}
}
//Derived Class
Public Class DerivedClass: BaseClass
{
public override string Name()
{
return "my name is Akiii";
}
}
Thanks and Regards
Akiii
Asked In: Many Interviews |
Alert Moderator