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


Please Help Members By Posting Answers For Below Questions

Is c# slower than java?

484


What's the c# syntax to catch any possible exception?

494


What is ilist c#?

510


explain the three services model commonly know as a three-tier application.

555


Can a child class call the constructor of a base class?

550






Explain the 3 types of properties in c# with an example?

548


Why do we use partial class in c#?

490


In which way you can convert a value-type to a reference-type?

541


How to update the gui from another thread in c#?

561


What is data reader in c#?

603


what is an event? Define delegate?

533


What is xamarin used for?

513


Is a valid int value?

486


What is use of FormBoarderStyle Propertie

535


What is the base class of all classes in c#?

512