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

What is constructors, explain with syntax

711


What are the uses of delegates in c#?

780


Why is xml called extensible?

656


What is string concatenation?

666


What is the difference between and xml documentation tag?

741


What is the delegate in c#?

660


What is console programming language?

677


what is full assembly reference

716


What is attribute and reflection in c#?

665


What is private protected in c#?

647


What is Assembly. and Describe type of assembly. why most developer happy with private assembly.

767


Is multilevel inheritance possible in c#?

646


What is the use of static members with example using c#.net.

677


Define c# and list the features.

725


how to Create a datagridview control with check box column with 8rows in it, the maximum number of check boxes checked should be 3, when user checks the 4th corresponding message should be displayed and check box should be checked. User can uncheck the checked boxes Note: read-only property should not be used

2586