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 a abstract class have a constructor?
Is stringbuilder faster than string concatenation c#?
What are actions in c#?
What are the generation of Garbage Collection in C# .NET ?
Why do we need delegates?
What is multidimensional array in c#?
How to rotate an Image in C#?
Define assert() method? How does it work?
Describe an abstract class?
What is the difference between dll and lib?
When do we generally use destructors to release resources?
What is the difference between struct and class in c#?
How objects are stored in memory?
What is global namespace in c#?
How can I make sure my c# classes will interoperate with other .net languages?