write the Syntax for Function or Method Overriding?
Answer Posted / pritam kumar
class parent
{
public virtual void print()
{
Console.Writeline ("method from parent class");
}
}
class child:parent
{
public override void print()
{
Console.Writeline("method from base class ");
}
}
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Can we inherit a class with private constructor in c#?
What is the difference between arraylist and list in c#?
What is void in c#?
What is Implementation inheritance and interface inheritance?
Is array ienumerable c#?
Does c# support properties of array types?
Can I define a type that is an alias of another type (like typedef in c++)?
Does constructor return any value in c#?
What is the use of iqueryable in c#?
What are value types in c#?
Why do we need nullable types in c#?
What's difference between constants and static readonly?
What is arraylist class in c#?
what are the different ways a method can be overloaded?
What Is A Multicast Delegate?