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 ulong in c#?
What is lastindexof c#?
Which is faster array or arraylist in c#?
What does question mark mean in c#?
What do u meant by "SBI" of an object?
How do I use the 'using' keyword with multiple objects?
Explain synchronous and asynchronous operations?
Explain the difference between boxing and unboxing.
What is Global Assembly Cache (GAC) and what is the purpose of it? (How to make an assembly to public? Steps) How more than one version of an assembly can keep in same place?
Give an example of removing an element from the queue?
What is a datacontract?
How string definitions will prevent escaping on backslashes in C#?
Why do we use abstraction in c#?
What is an indexer in c#?
Can we override interface methods in c#?