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 what a diffgram, and a good use for one Define diffgram? How it be used?
What is string interpolation in c#?
How do I count the length of a string in c#?
Do extension methods have to be static?
Differentiate between object pooling and connection pooling in c#?
Why we use delegates in c#?
What is a jagged array?
For methods inside the interface why can’t you specify the accessibility modifier?
How many destructors can a class have?
What is private readonly in c#?
Is ram a heap?
What is different between Boxing and Unboxing?
Can abstract class be sealed?
Can a private virtual method can be overridden?
Why do I get an error (cs1006) when trying to declare a method without specifying a return type?