write the Syntax for Function or Method Overriding?

Answer Posted / ashish gupta

class base
{
public virtual func()
{
}
}
class derive:base
{
//override the base funcion..signature n return value
// must be same
public override func()
{
}
}

Is This Answer Correct ?    19 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between tostring() vs convert.tostring() vs (string) cast

542


My switch statement works differently! Why?

512


What does the dispose method do with the connection object?

535


I have 3 overloaded constructors in my class. In order to avoid making instance of the class do I need to make all constructors to private?

550


What is oledb in c#?

501






What is static and use of it?

467


Can a constructor be static in c#?

515


What's the difference between WindowsDefaultLocation and WindowsDefaultBounds?

601


Explain namespaces in c#.

584


What is a int in c#?

457


Can we inherit a private class in c#?

460


Why do we use inheritance in c#?

477


What is a web service in c#?

581


What are the uses of delegates in c#?

575


Is ram a heap?

505