write the Syntax for Function or Method Overriding?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
Answer / nageswari
void function name(aruments)
{
statements
return()
}
| Is This Answer Correct ? | 0 Yes | 8 No |
Answer / 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 |
Define Abstract Class in C#
What are satellite assemblies? How will you get the different language strings?
When do we generally use destructors to release resources?
Where is the keyword void used?
What is the use of iqueryable in c#?
What is service contract
What is ienumerable and iqueryable?
How will U encapsulate button trigger event into text_box event of Pressing Enter key?
Which compiler switch creates an xml file from xml comments in the files in an assembly?
What is a console?
Can constructor have return type c#?
Can you explain template pattern?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)