write the Syntax for Function or Method Overriding?
Answer Posted / madhu nagidi
//Below is syntax for function
function test_func()
{
}
//Below is syntax for Method Overriding
Class JJ
{
Test_method(string a, string b)
{
a="Google";
}
}
class MM : JJ
{
Test_method(string a, string b)
{
a = "Micorsoft";
}
}
//Here overriding the functionality of the method which is
in Base Class.
| Is This Answer Correct ? | 1 Yes | 11 No |
Post New Answer View All Answers
Explain the Usage of web.config
How to achieve polymorphism in c#?
What is helper method in c#?
What is a virtual property. Give an example?
What is a strong name in c#?
What is application c#?
Is c# pass by reference?
Can we create extension method for interface?
In which order the constructor is called for an inherited class?
Name the connections does microsoft sql server support?
What are the different types of constructors?
What is the use of base keyword? Tell me a practical example for base keyword’s usage?
What is class and object c#?
Why linq is having select clause at the end?
Are c# strings immutable?