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
What is the difference between ref & out parameters in c#?
What is polymorphism c# example?
What is an example of a delegate?
What is a Command Object in C#?
What is the data encapsulation?
Can you call from an inherited constructor to a specific base constructor if both base class and an inheriting class has a number of overloaded constructors?
Is system a class in c#?
Can a sealed class be used as a base class?
What is readline library?
What is the difference between Decorator and Adapter pattern?
Explain how to implement delegates in c#.net
What is the default value of datetime in c#?
Is versioning applicable to private assemblies?
Can we extend sealed class in c#?
Explain manifest & metadata in c#.